/**
 * Step1 Styles - Airports Taxi Booking System
 * MVC Refactored
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #ffffff;
    color: #333;
    min-height: 100vh;
    padding: 40px 0;
}

.booking-container {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    overflow: visible;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    position: relative;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    html, body {
        padding: 0;
        margin: 0;
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
        font-size: 16px;
        background: #ffffff;
    }

    .booking-container {
        max-width: 100vw !important;
        width: 100vw !important;
        margin: 0 !important;
        padding: 0 !important;
        border-radius: 25px !important;
        box-shadow: none !important;
        box-sizing: border-box !important;
        border: 4px solid #2c3e50 !important;
        background: #ffffff;
    }

    .step-header {
        border-radius: 21px 21px 0 0;
        padding: 35px 10px;
    }

    .step-progress {
        margin-top: 30px !important;
    }

    .step-title {
        font-size: 14px !important;
        word-wrap: break-word;
    }

    .content-container {
        padding: 0;
        box-sizing: border-box;
        width: 100%;
        max-width: 100%;
    }

    input, select, textarea {
        font-size: 16px;
        min-height: 44px;
    }

    .datetime-section,
    .address-section {
        padding: 0 !important;
        margin: 0 0 10px 0 !important;
        border: none !important;
        box-shadow: none !important;
        background: transparent !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .address-input-wrapper {
        width: 100% !important;
        margin: 0 0 40px 0 !important;
    }

    .address-icon {
        left: 6px !important;
    }

    .address-section > div > div:first-child {
        left: 6px !important;
    }

    .address-input,
    #fromLocation,
    #toLocation {
        width: 100% !important;
        max-width: 100vw !important;
        box-sizing: border-box !important;
        margin: 0 !important;
        border-radius: 10px !important;
        padding: 15px 15px 15px 45px !important;
        border: 2px solid #e9ecef !important;
        background: #f8f9fa !important;
        font-size: 16px !important;
    }

    .date-input,
    .time-input,
    input {
        background: #f8f9fa !important;
        border: 2px solid #e9ecef !important;
        border-radius: 10px !important;
    }

    #languageSelector {
        background: rgba(255,255,255,0.1) !important;
        color: white !important;
    }

    .address-section > div {
        margin: 0 0 8px 0 !important;
        padding: 0 !important;
    }

    .datetime-row {
        flex-direction: column;
        gap: 8px;
        width: 100%;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .date-section,
    .time-section {
        width: 100% !important;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .time-inputs {
        justify-content: center !important;
    }

    .datetime-row input,
    .datetime-row .date-input {
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .date-section {
        flex: 1.5;
        width: auto;
    }

    .time-section {
        flex: 1;
        width: auto;
    }

    .time-inputs {
        justify-content: center;
    }

    .date-input {
        font-size: 14px;
        padding: 12px 10px;
        border: 2px solid #e9ecef !important;
        border-radius: 10px !important;
        width: 100% !important;
        max-width: 200px !important;
    }

    .time-input {
        width: 40px;
        font-size: 14px;
        padding: 8px 4px;
    }

    .time-desktop {
        display: none !important;
    }

    .time-mobile {
        display: flex !important;
        justify-content: center !important;
    }

    .time-mobile .time-input {
        width: 130px !important;
        padding: 12px !important;
        font-size: 16px !important;
        border: 2px solid #e9ecef !important;
        border-radius: 10px !important;
    }

    .options-section {
        flex-direction: row;
        gap: 10px;
    }

    .option-button {
        min-height: 50px;
        font-size: 12px;
        padding: 10px 8px;
        border: 2px solid #e9ecef !important;
        border-radius: 10px !important;
    }

    .btn-primary {
        width: 100%;
        min-height: 50px;
        font-size: 16px;
        padding: 15px 30px;
    }

    .custom-calendar {
        left: 5px;
        right: 5px;
        max-width: calc(100vw - 10px);
        padding: 15px;
    }

    .calendar-day {
        font-size: 16px;
        padding: 12px 6px;
        min-height: 44px;
    }

    .calendar-header {
        font-size: 18px;
        padding: 10px;
    }

    .calendar-nav {
        font-size: 20px;
        padding: 8px 12px;
    }

    .calendar-day-header {
        font-size: 14px;
        padding: 8px;
    }

    .extra-stop-input {
        font-size: 16px;
        border: 2px solid #e9ecef !important;
        border-radius: 10px !important;
    }

    .step-header > div:first-child {
        top: 5px !important;
        right: 50% !important;
        transform: translateX(50%) !important;
    }

    #languageSelector {
        font-size: 14px;
        padding: 8px 12px;
    }

    .suggestions-dropdown {
        max-height: 50vh;
        font-size: 16px;
    }

    .suggestion-item {
        padding: 15px;
    }
}

@media (max-width: 375px) {
    .step-title {
        font-size: 13px !important;
    }

    .step-progress {
        gap: 8px;
    }

    .progress-dot {
        width: 10px;
        height: 10px;
    }

    .calendar-day {
        font-size: 12px;
        padding: 6px 2px;
        min-height: 28px;
    }
}

.step-header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 25px 20px;
    text-align: center;
    border-radius: 15px 15px 0 0;
    position: relative;
}

.step-progress {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

.progress-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.progress-dot:hover {
    transform: scale(1.2);
}

.progress-dot.active {
    background: white;
}

.progress-dot.completed {
    background: #28a745;
}

.progress-dot.disabled {
    background: rgba(255,255,255,0.3);
    cursor: not-allowed;
    opacity: 0.5;
}

.progress-dot.disabled:hover {
    transform: none;
}

.step-title {
    font-size: 24px;
    font-weight: 600;
    color: white;
    margin-bottom: 15px;
}

.content-container {
    padding: 20px;
    overflow: visible;
    min-height: 500px;
    position: relative;
}

.datetime-section {
    background: #fff;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.address-section {
    background: #fff;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.address-input-wrapper {
    position: relative;
    margin-bottom: 15px;
    width: 100%;
}

.address-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
}

.address-input-wrapper input {
    padding-left: 45px;
    width: 100%;
    box-sizing: border-box;
    cursor: text;
}

.address-input {
    padding-left: 45px;
    cursor: text;
}

.datetime-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

.datetime-row {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.date-section {
    flex: 2;
}

.time-section {
    flex: 1;
}

.section-label {
    font-size: 16px;
    font-weight: 600;
    color: #666;
    margin-bottom: 10px;
}

.date-input-container {
    position: relative;
}

.date-input {
    width: 100%;
    min-width: 250px;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.date-input:hover {
    border-color: #007bff;
    background: white;
}

.time-inputs {
    display: flex;
    gap: 15px;
    align-items: center;
}

.time-input {
    width: 70px;
    padding: 15px 10px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
}

.time-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

.time-mobile {
    display: none;
}

.time-separator {
    font-size: 24px;
    font-weight: 700;
    color: #007bff;
}

.custom-calendar {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #007bff;
    border-radius: 10px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    z-index: 1000;
    display: none;
    margin-top: 10px;
    padding: 10px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.calendar-nav {
    width: 28px;
    height: 28px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.calendar-nav:hover {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.calendar-month {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.calendar-day-header {
    padding: 5px 2px;
    font-size: 10px;
    font-weight: 600;
    color: #666;
    text-align: center;
    text-transform: uppercase;
}

.calendar-day {
    padding: 6px 2px;
    text-align: center;
    cursor: pointer;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
    min-height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-day:hover {
    background: #e3f2fd;
    color: #007bff;
}

.calendar-day.today {
    background: #007bff;
    color: white;
    font-weight: 600;
}

.calendar-day.selected {
    background: #28a745;
    color: white;
    font-weight: 600;
}

.calendar-day.disabled {
    color: #ccc;
    cursor: not-allowed;
}

.calendar-day.disabled:hover {
    background: transparent;
    color: #ccc;
}

.options-section {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.option-button {
    flex: 1;
    padding: 15px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    cursor: pointer;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.option-button:hover {
    background: #e9ecef;
    border-color: #007bff;
    color: #007bff;
}

.option-button.active {
    background: #007bff;
    border-color: #007bff;
    color: white;
}

.extra-stop-container {
    margin-top: 20px;
}

.extra-stop-input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #ddd;
    border-radius: 12px;
    font-size: 16px;
    margin-top: 10px;
}

.extra-stop-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

.action-buttons {
    text-align: center;
    margin-top: 40px;
}

.btn-primary {
    background: #007bff;
    color: white;
    border: none;
    padding: 18px 40px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: #0056b3;
    transform: translateY(-2px);
}

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.address-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    padding: 8px 12px;
    margin: 5px 0 15px 0;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.3;
    display: flex;
    align-items: flex-start;
    gap: 6px;
    animation: errorSlideIn 0.3s ease-out;
    width: 100%;
    box-sizing: border-box;
}

.address-error::before {
    content: "\26A0\FE0F";
    font-size: 13px;
    flex-shrink: 0;
    margin-top: 1px;
}

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

.date-input.error,
.extra-stop-input.error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.15) !important;
    background: #fff5f5;
}

.date-input.error:focus,
.extra-stop-input.error:focus {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.25) !important;
}

.date-input.success,
.extra-stop-input.success {
    border-color: #28a745 !important;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.15) !important;
    background: #f8fff8;
}

button, a, input, select, textarea {
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

/* Suggestions dropdown */
.suggestions-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 99999;
    display: none;
    max-height: 300px;
    overflow-y: auto;
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
}

.suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    user-select: none;
    position: relative;
    z-index: 99999;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

.suggestion-item:hover {
    background: #f5f5f5;
}

.suggestion-item:last-child {
    border-bottom: none;
}
