/* Basic Wrapper */
.bdfc-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    background: #f5f5f5;
    padding: 20px;
    border-radius: 8px;
}

/* Row Layout */
.bdfc-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    align-items: flex-end;
}

/* Row 1: Destination Country, Province/State, Zip Code */
.bdfc-row-1 {
    background: #fff;
    padding: 15px;
    border-radius: 4px;
}

.bdfc-row-1 .bdfc-field-country {
    flex: 2;
}

.bdfc-row-1 .bdfc-field-province {
    flex: 2;
}

.bdfc-row-1 .bdfc-field-zipcode {
    flex: 1.5;
}

/* Product Row Container */
.bdfc-product-row {
    background: #fff;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 15px;
}

/* Row 2: Weight, Parcel Size */
.bdfc-row-2 {
    margin-bottom: 10px;
}

.bdfc-row-2 .bdfc-field-weight {
    flex: 1;
}

.bdfc-row-2 .bdfc-field-parcel-label {
    flex: 0 0 auto;
    display: flex;
    align-items: flex-end;
    padding-bottom: 8px;
}

.bdfc-row-2 .bdfc-field-parcel-label label {
    margin-bottom: 0;
    font-weight: 600;
    color: #666;
}

.bdfc-row-2 .bdfc-field-length,
.bdfc-row-2 .bdfc-field-width,
.bdfc-row-2 .bdfc-field-height {
    flex: 0.8;
}

/* Row 3: Warehouse, Category, Item Count */
.bdfc-row-3 .bdfc-field-warehouse {
    flex: 2;
}

.bdfc-row-3 .bdfc-field-category {
    flex: 2;
}

.bdfc-row-3 .bdfc-field-count {
    flex: 1;
}

/* Row 4: Actions */
.bdfc-row-actions {
    background: #fff;
    padding: 15px;
    border-radius: 4px;
    justify-content: space-between;
    align-items: center;
}

.bdfc-buttons-left {
    display: flex;
    gap: 10px;
}

/* Fields */
.bdfc-field {
    display: flex;
    flex-direction: column;
}

.bdfc-field label {
    font-size: 0.85rem;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}

.bdfc-required {
    color: #e74c3c;
    font-weight: bold;
}

.bdfc-help-icon {
    color: #999;
    cursor: help;
    margin-left: 4px;
}

.bdfc-field input,
.bdfc-field select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.95rem;
    background: #fff;
}

.bdfc-field input:focus,
.bdfc-field select:focus {
    outline: none;
    border-color: #007cba;
}

.bdfc-field input::placeholder {
    color: #999;
}

/* Buttons */
.bdfc-btn {
    padding: 10px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.2s;
}

.bdfc-btn-primary {
    background: #e74c3c;
    color: white;
}

.bdfc-btn-primary:hover {
    background: #c0392b;
}

.bdfc-btn-secondary {
    background: #ecf0f1;
    color: #333;
}

.bdfc-btn-secondary:hover {
    background: #bdc3c7;
}

.bdfc-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Unit Toggle */
.bdfc-unit-toggle {
    display: flex;
    align-items: center;
}

.bdfc-unit-toggle label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.9rem;
    color: #555;
}

.bdfc-unit-toggle input[type="checkbox"] {
    margin-right: 8px;
}

/* Currency Row */
.bdfc-currency-row {
    background: #fff;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.bdfc-currency-row .bdfc-field {
    max-width: 300px;
}

/* Results Table */
.bdfc-results-area {
    margin-top: 20px;
    background: #fff;
    padding: 20px;
    border-radius: 4px;
}

.bdfc-table-responsive {
    overflow-x: auto;
}

.bdfc-results-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.bdfc-results-table th,
.bdfc-results-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.bdfc-results-table th {
    background: #f4f4f4;
    font-weight: 600;
}

.bdfc-details-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
}

.bdfc-details-btn:hover {
    background: #2980b9;
}

/* Loading Spinner */
.bdfc-loading-spinner {
    margin-left: 8px;
}

/* Responsive */
@media (max-width: 768px) {
    .bdfc-row {
        flex-direction: column;
        align-items: stretch;
    }

    .bdfc-row-actions {
        flex-direction: column;
        gap: 15px;
    }

    .bdfc-buttons-left {
        width: 100%;
        flex-direction: column;
    }

    .bdfc-btn {
        width: 100%;
    }
}