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

body {
    font-family: "Poppins", sans-serif;
    background: #ffd700;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Google Places Autocomplete dropdown - ensure it appears above everything on mobile */
.pac-container {
    z-index: 10000 !important;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    margin-top: 5px;
    font-family: "Poppins", sans-serif;
}

.pac-item {
    padding: 10px 12px;
    cursor: pointer;
    font-size: 14px;
    border-bottom: 1px solid #eee;
}

.pac-item:hover {
    background-color: #f5f5f5;
}

.pac-item-query {
    font-size: 14px;
    color: #333;
}

.pac-matched {
    font-weight: 600;
}

.pac-icon {
    margin-right: 8px;
}

.container {
    width: 100%;
    max-width: 420px;
    min-height: 100vh;
    background: #ffd700;
    padding: 10px;
    position: relative;
}

/* Header/Logo */
.header {
    text-align: center;
    margin-bottom: 5px;
}

.logo {
    max-width: 100%;
    height: auto;
}

.logo img {
    max-width: 100%;
    height: auto;
}

/* Screen 1 - Language Selection */
.screen {
    display: none;
}

.screen.active {
    display: block;
}

/* Language Change Button (Screen 2) */
.change-lang-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #fff8dc;
    border: none;
    border-radius: 20px;
    padding: 6px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.change-lang-btn:hover {
    background: #fff;
    transform: scale(1.02);
}

.change-lang-btn img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.change-lang-btn span {
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.change-lang-btn svg {
    color: #666;
}

.mascot-image {
    width: 60%;
    max-width: 200px;
    margin: 0 auto 15px auto;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.mascot-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Hero Card for Screen 1 */
.hero-card {
    width: 100%;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    margin-bottom: 20px;
}

.hero-logo {
    padding: 15px 20px 10px;
    background: #ffd700;
}

.hero-logo img {
    width: 100%;
    height: auto;
    display: block;
}

.hero-mascot {
    width: 100%;
    overflow: hidden;
}

.hero-mascot img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Hero Image for Screen 1 (legacy) */
.hero-image {
    width: 100%;
    max-width: 100%;
    margin: 0 auto 20px auto;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.hero-image img {
    width: 100%;
    height: auto;
    display: block;
}

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

.language-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
    padding: 0 5px;
}

.lang-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 3px solid transparent;
    border-radius: 12px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    transform: scale(1.05);
}

.lang-btn.selected {
    border-color: #007aff;
    background: rgba(0, 122, 255, 0.1);
}

.lang-btn img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.lang-btn span {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.captcha-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.next-btn-container {
    display: flex;
    justify-content: center;
    margin-top: 15px;
}

.next-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #00a8e8;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    padding: 14px 80px 14px 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 168, 232, 0.4);
}

.next-btn:hover:not(:disabled) {
    background: #0096d1;
    transform: scale(1.02);
}

.next-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.next-btn-icon {
    width: 44px;
    height: 44px;
    background: transparent;
    border: 2px solid #ffd700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.next-btn-icon svg {
    width: 24px;
    height: 24px;
    fill: #ffd700;
}

.next-btn-text {
    font-size: 18px;
    font-weight: 600;
    color: white;
    letter-spacing: 1px;
}

.next-btn svg {
    width: 28px;
    height: 28px;
    fill: white;
}

/* Screen 2 - Booking Form */
.form-group {
    margin-bottom: 10px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.input-wrapper {
    position: relative;
    background: #fff8dc;
    border-radius: 8px;
}

.input-wrapper input {
    width: 100%;
    padding: 10px 40px 10px 36px;
    border: none;
    background: transparent;
    font-size: 14px;
    font-family: "Poppins", sans-serif;
    color: #333;
    /* Ensure proper touch behavior on mobile */
    -webkit-appearance: none;
    appearance: none;
    touch-action: manipulation;
}

.input-wrapper input::placeholder {
    color: #999;
}

.input-wrapper input:focus {
    outline: none;
    /* Highlight the input on focus */
    background: rgba(255, 255, 255, 0.3);
}

.input-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #666;
}

.input-check {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    background: #007aff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.input-check svg {
    width: 16px;
    height: 16px;
    fill: white;
}

/* Vehicle Selection */
.vehicle-section {
    background: #fff8dc;
    border-radius: 8px;
    padding: 8px 10px;
    margin-bottom: 8px;
}

.vehicle-title {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.vehicle-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.vehicle-card {
    background: white;
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.vehicle-card.selected {
    background: #007aff;
    border-color: #007aff;
}

.vehicle-card.selected .vehicle-name,
.vehicle-card.selected .vehicle-info {
    color: white;
}

.vehicle-icon {
    width: 30px;
    height: 24px;
    object-fit: contain;
}

.vehicle-card.selected .vehicle-icon {
    filter: brightness(0) invert(1);
}

.vehicle-details {
    flex: 1;
}

.vehicle-name {
    font-size: 13px;
    font-weight: 700;
    color: #333;
}

.vehicle-info {
    font-size: 10px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 4px;
}

.vehicle-check {
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vehicle-check svg {
    width: 12px;
    height: 12px;
    fill: #007aff;
}

/* Message Section */
.message-section {
    background: #fff8dc;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 8px;
}

.message-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.message-icon {
    width: 28px;
    height: 28px;
    background: #007aff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.message-icon svg {
    width: 16px;
    height: 16px;
    fill: white;
}

.message-title {
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.message-textarea {
    width: 100%;
    min-height: 45px;
    padding: 8px;
    border: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    font-family: "Poppins", sans-serif;
    color: #666;
    resize: none;
}

.message-textarea:focus {
    outline: none;
    background: white;
}

/* Terms Checkbox */
.terms-group {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 10px;
}

.checkbox-wrapper {
    width: 20px;
    height: 20px;
    border: 2px solid #333;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}

.checkbox-wrapper.checked {
    background: #007aff;
    border-color: #007aff;
}

.checkbox-wrapper svg {
    width: 14px;
    height: 14px;
    fill: white;
    display: none;
}

.checkbox-wrapper.checked svg {
    display: block;
}

.terms-text {
    font-size: 12px;
    color: #333;
    line-height: 1.3;
}

.terms-text a {
    color: #007aff;
    text-decoration: underline;
}

.terms-text-wrapper {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.terms-view-link {
    font-size: 12px;
    color: #007aff;
    text-decoration: underline;
    cursor: pointer;
}

.terms-view-link:hover {
    color: #0056b3;
}

/* Book Now Button */
.book-now-btn {
    width: 100%;
    background: linear-gradient(135deg, #1a5276 0%, #2874a6 100%);
    border-radius: 50px;
    padding: 16px 24px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.2s ease;
    color: #fff;
    font-weight: bolder;
    font-size: larger;
}

.book-now-btn:active {
    transform: scale(0.98);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.book-now-btn:disabled {
    background: linear-gradient(135deg, #7f8c8d 0%, #95a5a6 100%);
    opacity: 0.7;
    cursor: not-allowed;
}

.book-now-text {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.5px;
}

.book-now-price {
    background: #ffd700;
    color: #000;
    padding: 4px 14px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 16px;
    min-width: 60px;
    text-align: center;
}

/* Responsive */
@media (max-width: 380px) {
    .language-grid {
        gap: 10px;
    }

    .lang-btn img {
        width: 40px;
        height: 40px;
    }

    .lang-btn span {
        font-size: 12px;
    }

    .next-btn {
        width: 100%;
        height: 60px;
    }
}

/* Loading overlay */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.loading-overlay.active {
    display: flex;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #fff;
    border-top-color: #007aff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Terms Modal Styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10001;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-container {
    background: #fff;
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
    background: #ffd700;
    border-radius: 16px 16px 0 0;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
}

.modal-close svg {
    width: 24px;
    height: 24px;
    fill: #333;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
}

.modal-body h3 {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin: 0 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #ffd700;
}

.modal-body h4 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 20px 0 12px 0;
}

.modal-body h5 {
    font-size: 14px;
    font-weight: 600;
    color: #444;
    margin: 16px 0 8px 0;
}

.modal-body h6 {
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin: 12px 0 6px 0;
}

.modal-body p {
    margin: 0 0 12px 0;
    color: #555;
}

.modal-body p:last-child {
    margin-bottom: 0;
}

.modal-body strong {
    color: #333;
}

.modal-footer {
    padding: 16px 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
}

.modal-close-btn {
    background: #333;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    font-family: "Poppins", sans-serif;
}

.modal-close-btn:hover {
    background: #555;
}

/* Mobile adjustments for modal */
@media (max-width: 480px) {
    .modal-overlay {
        padding: 10px;
    }

    .modal-container {
        max-height: 90vh;
        border-radius: 12px;
    }

    .modal-header {
        padding: 12px 16px;
        border-radius: 12px 12px 0 0;
    }

    .modal-title {
        font-size: 16px;
    }

    .modal-body {
        padding: 16px;
        font-size: 13px;
    }

    .modal-body h3 {
        font-size: 18px;
    }

    .modal-body h4 {
        font-size: 15px;
    }

    .modal-body h5 {
        font-size: 13px;
    }

    .modal-footer {
        padding: 12px 16px;
    }
}

/* Screen 1 Mobile Optimization - Fit on one page */

/* Default mobile - limit mascot height */
#screen1.active {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 20px);
    padding: 5px 0;
}

#screen1:not(.active) {
    display: none;
}

.hero-mascot img {
    max-height: 280px;
    object-fit: cover;
    object-position: center top;
}

/* iPhone 15 Pro Max and similar (height ~900px) */
@media (max-height: 920px) {
    .hero-mascot img {
        max-height: 300px;
    }
}

/* iPhone 15, 14, 13 (height ~850px) */
@media (max-height: 860px) {
    .hero-card {
        margin-bottom: 15px;
    }

    .hero-logo {
        padding: 10px 15px 8px;
    }

    .hero-mascot img {
        max-height: 220px;
    }

    .language-title {
        font-size: 20px;
        margin-bottom: 15px;
    }

    .language-grid {
        gap: 10px;
        margin-bottom: 15px;
    }

    .lang-btn img {
        width: 45px;
        height: 45px;
    }
}

/* Smaller phones (height ~750px) */
@media (max-height: 750px) {
    .hero-card {
        margin-bottom: 12px;
    }

    .hero-logo {
        padding: 10px 15px 5px;
    }

    .hero-mascot img {
        max-height: 310px;
    }

    .language-title {
        font-size: 18px;
        margin-bottom: 12px;
    }

    .language-grid {
        gap: 8px;
        margin-bottom: 12px;
    }

    .lang-btn {
        padding: 5px;
        gap: 3px;
    }

    .lang-btn img {
        width: 40px;
        height: 40px;
    }

    .lang-btn span {
        font-size: 12px;
    }

    .next-btn-container {
        margin-top: 10px;
    }

    .next-btn {
        padding: 10px 60px 10px 16px;
    }

    .next-btn-icon {
        width: 36px;
        height: 36px;
    }

    .next-btn-icon svg {
        width: 20px;
        height: 20px;
    }

    .next-btn-text {
        font-size: 16px;
    }
}

/* Extra small screens */
@media (max-height: 650px) {
    .hero-mascot img {
        max-height: 160px;
    }

    .hero-logo {
        padding: 8px 12px 5px;
    }

    .language-title {
        font-size: 16px;
        margin-bottom: 10px;
    }

    .lang-btn img {
        width: 35px;
        height: 35px;
    }

    .lang-btn span {
        font-size: 11px;
    }

    .language-grid {
        gap: 6px;
        margin-bottom: 10px;
    }
}

/* Very small screens (iPhone SE, etc.) */
@media (max-height: 570px) {
    .container {
        padding: 5px;
    }

    .hero-card {
        margin-bottom: 8px;
        border-radius: 12px;
    }

    .hero-mascot img {
        max-height: 120px;
    }

    .hero-logo {
        padding: 5px 10px 3px;
    }

    .language-title {
        font-size: 14px;
        margin-bottom: 8px;
    }

    .lang-btn {
        padding: 3px;
        gap: 2px;
    }

    .lang-btn img {
        width: 30px;
        height: 30px;
    }

    .lang-btn span {
        font-size: 10px;
    }

    .language-grid {
        gap: 4px;
        margin-bottom: 8px;
    }

    .next-btn {
        padding: 8px 50px 8px 14px;
        border-radius: 10px;
    }

    .next-btn-icon {
        width: 32px;
        height: 32px;
    }

    .next-btn-icon svg {
        width: 18px;
        height: 18px;
    }

    .next-btn-text {
        font-size: 14px;
    }

    .next-btn-container {
        margin-top: 8px;
    }
}

/* ==========================================
   Booking Result Popup Modal
   ========================================== */
.booking-result-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    padding: 20px;
}

.booking-result-modal.active {
    display: flex;
}

.booking-result-content {
    background: #fff;
    border-radius: 20px;
    padding: 30px;
    max-width: 350px;
    width: 100%;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: popupSlideIn 0.3s ease;
}

@keyframes popupSlideIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.booking-result-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.result-icon {
    margin-bottom: 10px;
}

.result-icon svg {
    width: 80px;
    height: 80px;
}

.result-title {
    font-size: 22px;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.result-title.error-title {
    color: #f44336;
}

.result-message {
    font-size: 14px;
    color: #666;
    margin: 0;
    line-height: 1.5;
}

.order-number-box {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    border-radius: 12px;
    padding: 15px 25px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin: 10px 0;
}

.order-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.order-value {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 2px;
}

.phone-number-box {
    background: #ffd700;
    border-radius: 12px;
    padding: 15px 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 10px 0;
    text-decoration: none;
    transition:
        transform 0.2s,
        box-shadow 0.2s;
}

.phone-number-box:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

.phone-number-box svg {
    width: 24px;
    height: 24px;
}

.phone-number-box span {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.result-close-btn {
    background: #333;
    color: #fff;
    border: none;
    border-radius: 25px;
    padding: 12px 40px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition:
        background 0.2s,
        transform 0.2s;
    margin-top: 10px;
    font-family: "Poppins", sans-serif;
}

.result-close-btn:hover {
    background: #444;
    transform: scale(1.02);
}

/* Mobile adjustments for booking result modal */
@media (max-width: 400px) {
    .booking-result-content {
        padding: 25px 20px;
        margin: 10px;
    }

    .result-icon svg {
        width: 70px;
        height: 70px;
    }

    .result-title {
        font-size: 20px;
    }

    .order-value {
        font-size: 24px;
    }

    .phone-number-box span {
        font-size: 16px;
    }
}
