/* Container */
.fc-container {
    max-width: 900px;
    margin: 20px auto;
    padding: 20px;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.fc-container h2 {
    color: #1a3c6e;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e8e8e8;
}

/* Sections */
.fc-section {
    margin-bottom: 25px;
    padding: 10px;
    background: #f9fafc;
    border-radius: 8px;
    border: 1px solid #e8e8e8;
}

.fc-section h3 {
    color: #1a3c6e;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 16px;
}

/* Form Rows */
.fc-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.fc-group {
    flex: 1 1 calc(50% - 15px);
    min-width: 200px;
}

.fc-group.full-width {
    flex: 1 1 100%;
}

/* 3-column row (Personal Details) */
.fc-row-3col .fc-group {
    flex: 1 1 0;
    min-width: 0;
}

/* Labels */
.fc-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.fc-group .required {
    color: #dc3545;
}

/* Inputs */
.fc-group input[type="text"],
.fc-group input[type="tel"],
.fc-group input[type="email"],
.fc-group input[type="number"],
.fc-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.fc-group input:focus,
.fc-group select:focus {
    border-color: #1a3c6e;
    outline: none;
    box-shadow: 0 0 0 2px rgba(26, 60, 110, 0.1);
}

.fc-group input[readonly] {
    background: #f5f5f5;
    cursor: not-allowed;
}

/* Buttons */
.fc-btn-distance,
.fc-btn-calculate,
.fc-btn-save,
.fc-btn-cancel {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.fc-btn-distance {
    background: #17a2b8;
    color: white;
}

.fc-btn-distance:hover {
    background: #138496;
}

.fc-btn-distance:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.fc-btn-calculate {
    background: #1a3c6e;
    color: white;
    width: 100%;
    justify-content: center;
}

.fc-btn-calculate:hover {
    background: #0f2a4a;
}

.fc-btn-save {
    background: #28a745;
    color: white;
    min-width: 100px;
    justify-content: center;
}

.fc-btn-save:hover {
    background: #218838;
}

.fc-btn-save:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.fc-btn-cancel {
    background: #dc3545;
    color: white;
    min-width: 100px;
    justify-content: center;
}

.fc-btn-cancel:hover {
    background: #c82333;
}

.fc-action-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Distance wrapper */
.fc-distance-wrapper {
    display: flex;
    gap: 10px;
}

.fc-distance-wrapper input {
    flex: 1;
}

/* Status messages */
.fc-status {
    margin-top: 10px;
    font-size: 14px;
}

.fc-status .success {
    color: #28a745;
}

.fc-status .error {
    color: #dc3545;
}

.fc-status .loading {
    color: #17a2b8;
}

/* Location display */
.fc-location-display {
    margin-top: 5px;
    font-size: 13px;
}

.fc-location-display .location-found {
    color: #28a745;
}

.fc-location-display .location-error {
    color: #dc3545;
}

/* Result box */
.fc-result-box {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 2px solid #1a3c6e;
}

.fc-freight-display {
    text-align: center;
    padding: 15px;
    background: white;
    border-radius: 5px;
    margin-bottom: 15px;
}

.fc-amount-label {
    font-size: 16px;
    color: #666;
}

.fc-amount-value {
    font-size: 32px;
    color: #1a3c6e;
    font-weight: 700;
}

.fc-rate-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 10px 0;
}

.fc-rate-details p {
    margin: 5px 0;
}

.fc-notes {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
}

.fc-note {
    color: #666;
    font-style: italic;
}

.fc-customer-care {
    font-size: 15px;
    color: #1a3c6e;
}

/* Hide number input spinners on readonly distance field */
#fc_distance::-webkit-outer-spin-button,
#fc_distance::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

#fc_distance {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* Admin stats */
.fc-admin-stats {
    display: flex;
    gap: 20px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.fc-stat-box {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    flex: 1;
    min-width: 150px;
    text-align: center;
    border: 1px solid #dee2e6;
}

.fc-stat-box h3 {
    margin: 0;
    font-size: 14px;
    color: #666;
}

.fc-stat-number {
    font-size: 28px;
    font-weight: 700;
    color: #1a3c6e;
    margin: 10px 0 0;
}

/* Spinner */
.fc-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: fc-spin 0.6s linear infinite;
}

@keyframes fc-spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .fc-container {
        padding: 10px;
    }
    
    .fc-group {
        flex: 1 1 100%;
        min-width: 100%;
    }
    
    .fc-distance-wrapper {
        flex-direction: column;
    }
    
        .fc-row-3col .fc-group {
        flex: 1 1 100%;
        min-width: 100%;
    }

    .fc-rate-details {
        grid-template-columns: 1fr;
    }
    
    .fc-freight-amount {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .fc-action-buttons {
        flex-direction: column;
    }
    
    .fc-action-buttons button {
        width: 100%;
    }
}

/* Select2 custom styles */
.select2-container--default .select2-selection--single {
    height: 42px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 40px;
    padding-left: 12px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 40px;
}

/* Vehicle Type row: narrow group, wide dropdown */
.fc-section .fc-row-2col .fc-group:first-child {
    flex: 0 0 180px;   /* fixed 180px width for Vehicle Group */
    max-width: 180px;
}

.fc-section .fc-row-2col .fc-group:last-of-type {
    flex: 1 1 auto;    /* vehicle dropdown takes remaining space */
    min-width: 0;
}

/* Mobile: stack normally */
@media (max-width: 768px) {
    .fc-section .fc-row-2col .fc-group:first-child {
        flex: 1 1 100%;
        max-width: 100%;
    }
}

/* Cancel confirmation modal */
.fc-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

.fc-modal-box {
    background: #fff;
    padding: 25px 30px;
    border-radius: 8px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.fc-modal-box h3 {
    margin-top: 0;
    color: #003366;
}

.fc-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.fc-modal-yes,
.fc-modal-no {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
}

.fc-modal-yes {
    background: #dc3545;
    color: #fff;
}

.fc-modal-no {
    background: #6c757d;
    color: #fff;
}

/* Reduce font size in Select2 dropdowns */
.fc-vehicle-select + .select2-container .select2-selection--single .select2-selection__rendered,
.fc-vehicle-select + .select2-container .select2-selection--single .select2-selection__placeholder {
    font-size: 15px !important;
}

/* Reduce font size in the opened dropdown list */
.select2-container--default .select2-results__option {
    font-size: 15px !important;
    padding: 6px 10px;
}

/* Also apply to the search field inside the opened dropdown */
.select2-container--default .select2-search--dropdown .select2-search__field {
    font-size: 15px !important;
}

/* Optional: same size for the group dropdown (native select) */
#fc_vehicle_group {
    font-size: 15px;
}

