/* ========================================================
   ULTRA MODERN BOOKING FORM - STEP 1
   A sleek, modern design inspired by premium booking apps
   ======================================================== */

/* ========== VARIABLES ========== */
:root {
    --step1-primary: #ffc107;
    --step1-primary-dark: #e0a800;
    --step1-primary-light: #fff3cd;
    --step1-accent: #1a1a2e;
    --step1-bg: #f8fafc;
    --step1-card: #ffffff;
    --step1-text: #1f2937;
    --step1-text-muted: #6b7280;
    --step1-border: #e5e7eb;
    --step1-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --step1-shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.12);
    --step1-radius: 16px;
    --step1-radius-sm: 12px;
}

/* ========== STEP 1 CONTAINER ========== */
.step1-modern {
    padding: 0;
}

/* ========== SECTION CARDS ========== */
.step1-section {
    background: var(--step1-card);
    border-radius: var(--step1-radius);
    padding: 24px;
    margin-bottom: 16px;
    box-shadow: var(--step1-shadow);
    transition: all 0.3s ease;
}

.step1-section:hover {
    box-shadow: var(--step1-shadow-hover);
}

.step1-section__header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.step1-section__icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--step1-primary) 0%, var(--step1-primary-dark) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--step1-accent);
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

.step1-section__title {
    font-size: 18px;
    font-weight: 700;
    color: var(--step1-text);
    margin: 0;
}

.step1-section__subtitle {
    font-size: 13px;
    color: var(--step1-text-muted);
    margin: 0;
}

/* ========== DATE & TIME ROW ========== */
.step1-datetime {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.step1-datetime__item {
    position: relative;
}

/* ========== MODERN INPUT STYLES ========== */
.step1-input-group {
    position: relative;
    margin-bottom: 16px;
}

.step1-input-group:last-child {
    margin-bottom: 0;
}

.step1-input-group__label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--step1-text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.step1-input {
    width: 100%;
    padding: 16px 20px;
    padding-left: 50px;
    border: 2px solid var(--step1-border);
    border-radius: var(--step1-radius-sm);
    font-size: 16px;
    font-weight: 500;
    color: var(--step1-text);
    background: var(--step1-card);
    transition: all 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
    line-height: 1.5;
}

.step1-input:focus {
    outline: none;
    border-color: var(--step1-primary);
    box-shadow: 0 0 0 4px rgba(255, 193, 7, 0.15);
}

.step1-input::placeholder {
    color: #9ca3af;
}

.step1-input--icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    color: var(--step1-text-muted);
    pointer-events: none;
}

.step1-input-group--has-label .step1-input--icon {
    top: calc(50% + 14px);
}

/* Select styling */
.step1-select {
    width: 100%;
    padding: 16px 44px 16px 50px;
    border: 2px solid var(--step1-border);
    border-radius: var(--step1-radius-sm);
    font-size: 16px;
    font-weight: 500;
    color: var(--step1-text);
    background: var(--step1-card);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
    line-height: 1.5;
}

.step1-select:focus {
    outline: none;
    border-color: var(--step1-primary);
    box-shadow: 0 0 0 4px rgba(255, 193, 7, 0.15);
}

/* ========== TIME SELECTOR (NATIVE) ========== */
.step1-time-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.step1-time-select {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid var(--step1-border);
    border-radius: var(--step1-radius-sm);
    font-size: 18px;
    font-weight: 600;
    color: var(--step1-text);
    background: var(--step1-card);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
    text-align: center;
}

.step1-time-select:focus {
    outline: none;
    border-color: var(--step1-primary);
    box-shadow: 0 0 0 4px rgba(255, 193, 7, 0.15);
}

.step1-time-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--step1-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    text-align: center;
}

/* ========== FLIGHT DATA GRID ========== */
.step1-flight-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* ========== PASSENGER & LUGGAGE CARDS ========== */
.step1-counter-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.step1-counter-card {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 2px solid var(--step1-border);
    border-radius: var(--step1-radius-sm);
    padding: 16px 12px;
    text-align: center;
    transition: all 0.2s ease;
}

.step1-counter-card:hover {
    border-color: var(--step1-primary);
    background: var(--step1-primary-light);
}

.step1-counter-card__icon {
    width: 40px;
    height: 40px;
    margin: 0 auto 10px;
    background: linear-gradient(135deg, var(--step1-primary) 0%, var(--step1-primary-dark) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--step1-accent);
    font-size: 16px;
    box-shadow: 0 3px 8px rgba(255, 193, 7, 0.3);
}

.step1-counter-card__label {
    font-size: 12px;
    font-weight: 600;
    color: var(--step1-text-muted);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.step1-counter-card__controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.step1-counter-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 10px;
    background: white;
    color: var(--step1-text);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.step1-counter-btn:hover:not(:disabled) {
    background: var(--step1-primary);
    color: var(--step1-accent);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

.step1-counter-btn:active:not(:disabled) {
    transform: scale(0.92);
}

.step1-counter-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.step1-counter-btn i {
    pointer-events: none;
}

.step1-counter-value {
    min-width: 28px;
    font-size: 20px;
    font-weight: 700;
    color: var(--step1-text);
}

/* ========== CONTACT INFO GRID ========== */
.step1-contact-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ========== RESPONSIVE - MOBILE ========== */
@media (max-width: 767px) {
    .step1-section {
        padding: 20px 16px;
        margin-bottom: 12px;
        border-radius: 14px;
    }
    
    .step1-section__header {
        gap: 10px;
        margin-bottom: 16px;
    }
    
    .step1-section__icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .step1-section__title {
        font-size: 16px;
    }
    
    .step1-datetime {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .step1-flight-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .step1-counter-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    
    .step1-counter-card {
        padding: 12px 8px;
    }
    
    .step1-counter-card__icon {
        width: 36px;
        height: 36px;
        font-size: 14px;
        margin-bottom: 8px;
    }
    
    .step1-counter-card__label {
        font-size: 10px;
        margin-bottom: 8px;
    }
    
    .step1-counter-btn {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
    
    .step1-counter-value {
        font-size: 18px;
        min-width: 22px;
    }
    
    .step1-input,
    .step1-select {
        padding: 14px 18px;
        padding-left: 46px;
        font-size: 15px;
    }
    
    .step1-select {
        padding-right: 40px;
    }
    
    .step1-input-icon {
        left: 16px;
        width: 18px;
        height: 18px;
        font-size: 14px;
    }
    
    .step1-time-select {
        padding: 14px 16px;
        font-size: 16px;
    }
    
    .step1-time-label {
        font-size: 10px;
    }
}

/* Very small phones */
@media (max-width: 380px) {
    .step1-section {
        padding: 16px 12px;
    }
    
    .step1-counter-grid {
        gap: 6px;
    }
    
    .step1-counter-card {
        padding: 10px 6px;
    }
    
    .step1-counter-card__icon {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
    
    .step1-counter-card__label {
        font-size: 9px;
    }
    
    .step1-counter-btn {
        width: 28px;
        height: 28px;
        font-size: 10px;
    }
    
    .step1-counter-value {
        font-size: 16px;
        min-width: 20px;
    }
}

/* ========== HIDDEN ELEMENTS ========== */
.step1-hidden,
.step1-input-group.hidden {
    display: none !important;
}

/* ========== INPUT ICON POSITIONING ========== */
.step1-input-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    font-size: 16px;
    color: var(--step1-text-muted);
    opacity: 0.6;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    transition: all 0.2s ease;
}

.step1-input:focus ~ .step1-input-icon,
.step1-select:focus ~ .step1-input-icon {
    opacity: 1;
    color: var(--step1-primary);
}

.step1-input-group--has-label .step1-input-icon {
    top: calc(50% + 12px);
}

/* Ensure icons in relative positioned containers are properly aligned */
.step1-input-group > div[style*="position: relative"] {
    display: flex;
    align-items: center;
    position: relative;
}

.step1-input-group > div[style*="position: relative"] .step1-input-icon {
    z-index: 1;
}

/* ========== DATE PICKER CONTAINER ========== */
.step1-date-picker {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 100;
    margin-top: 4px;
}

/* ========== ERROR MESSAGE STYLING ========== */
.input-error-message {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #dc3545;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 12px;
    background: linear-gradient(135deg, #fff5f5 0%, #ffebee 100%);
    border: 1px solid #ffccd5;
    border-radius: 8px;
    margin-bottom: 8px;
    animation: errorSlideIn 0.3s ease;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.1);
}

.input-error-message i {
    color: #dc3545;
    font-size: 14px;
    flex-shrink: 0;
}

@keyframes errorSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Error state for inputs and selects */
.step1-input.error,
.step1-select.error,
.form-input.error,
.form-select.error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.15) !important;
    background: #fff5f5 !important;
}

/* Error state icon color */
.step1-input.error ~ .step1-input-icon,
.step1-select.error ~ .step1-input-icon {
    color: #dc3545 !important;
    opacity: 1 !important;
}

/* Mobile error styling */
@media (max-width: 767px) {
    .input-error-message {
        font-size: 12px;
        padding: 6px 10px;
        margin-bottom: 6px;
    }
    
    .input-error-message i {
        font-size: 12px;
    }
}

