/* exploreKorea/exploreKorea.Wizrad_Form/formStyle.css */

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    /* background: linear-gradient(135deg, #f5f7fa, #c3cfe2); */
    /* background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('https://images.unsplash.com/photo-1558959357-685f9c7ace7b') center/cover no-repeat; */
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), 
    url('../assets/img/home-bg.jpg') center/cover no-repeat;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    /* padding: 20px; */
}



.container {
    background: linear-gradient(135deg, #fdfcfb, #e2d1c3); /* parchment-like neutral tones */
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 450px;
    margin: 0 auto;
    animation: fadeIn 0.5s ease-in-out;
    z-index: 1000;
}

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

h2 {
    text-align: center;
    color: #333;
    margin-bottom: 15px;
    font-size: 22px;
    font-weight: 600;
}

label {
    font-weight: 500;
    color: #555;
    display: block;
    margin: 8px 0 4px;
    font-size: 14px;
}

input, select {
    width: 100%;
    padding: 8px;
    margin-bottom: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input:focus, select:focus {
    border-color: #007bff;
    box-shadow: 0 0 8px rgba(0, 123, 255, 0.3);
    outline: none;
}


button {
    width: 100%;
    padding: 10px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

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

button:active {
    transform: translateY(0);
}

button.secondary {
    background: #6c757d;
}

button.secondary:hover {
    background: #5a6268;
}



.form-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.form-group label {
    font-weight: 500;
    color: #333;
    flex: 1;
}
.form-group input, .form-group select {
    flex: 2;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
}
.full-width {
    width: 96%;
    margin-bottom: 12px;
}


/* --- DESTINATION LIST --- */
.destination-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
    border-top: none; /* Remove double border between input and list */
    border-radius: 0 0 6px 6px;
    max-height: 150px;
    overflow-y: auto;
    background: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    display: none;
}

.destination-list li {
    padding: 8px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    transition: background 0.3s ease;
    font-size: 13px;
}

.destination-list li:last-child {
    border-bottom: none;
}

.destination-list li:hover {
    background: #f9f9f9;
}

.destination-list input[type="checkbox"] {
    width: auto;
    margin: 0 8px 0 0;
    padding: 0;
    border: 1px solid #999;
    border-radius: 3px;
    cursor: pointer;
}

.selected-destinations {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #f9f9f9;
    overflow-x: auto;
    white-space: nowrap;
    font-size: 13px;
    cursor: pointer;
    height: 30px; 
    align-items: center;
}

.selected-destinations .selected-item {
    background: #007bff;
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.selected-destinations .selected-item:hover {
    background: #0056b3;
}

.selected-destinations .remove {
    font-size: 10px;
    color: white;
    cursor: pointer;
}

.selected-destinations::-webkit-scrollbar {
    height: 5px; 
}

.selected-destinations::-webkit-scrollbar-thumb {
    background-color: #aaa; 
    border-radius: 7px; 
}

.selected-destinations::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 6px;
}

.downArrow-icon {
    height: 40px;
    margin-left: auto;
}

.search-box {
    display: flex;
    align-items: center;
    /* margin-bottom: 15px; */
    margin: 0;
    padding: 0;
}

#searchInput {
    flex: 1;
    padding: 8px;
    font-size: 13px;
    border: 1px solid #ddd;
    margin: 0;
    border-radius: 6px 6px 0 0; /* Optional: square top, rounded bottom */
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#searchInput:focus {
    border-color: #007bff;
    box-shadow: 0 0 8px rgba(0, 123, 255, 0.3);
}
/* !--- DESTINATION LIST --- */

/* ---- CountryList Custom Dropdown Styles ---- */
.custom-dropdown {
    position: relative;
    width: 68%; /* Match the width of other inputs which have flex: 2 (68%) */
    font-family: inherit;
    cursor: pointer;
    font-size: 13px; /* Match the font size of other inputs */
    margin-bottom: 12px;
}

.dropdown-selected {
    padding: 8px; /* Match the padding of other inputs */
    border: 1px solid #ddd; /* Match the border of other inputs */
    border-radius: 6px; /* Match the border radius of other inputs */
    background-color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 18px; /* Match the height of other inputs */
    transition: border-color 0.3s ease, box-shadow 0.3s ease; /* Match other inputs */
}

.dropdown-selected:hover {
    border-color: #888;
}

.dropdown-arrow {
    font-size: 13px;
    transition: transform 0.2s;
    margin-left: auto;
}

.dropdown-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 180px;
    overflow-y: auto;
    border: 1px solid #ddd; /* Match input border */
    border-radius: 0 0 6px 6px; /* Match input border radius */
    background-color: white;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    font-size: 13px; /* Match input font size */
}

.dropdown-options.show {
    display: block;
}

.dropdown-option {
    /* padding: 1px 1px;  */
    height: 20px; /* Match input height */
    display: flex;
    align-items: center;
    transition: background-color 0.2s;
    margin-left: 5px;
}

.dropdown-option:hover {
    background-color: #f5f5f5;
}

.dropdown-option.selected {
    background-color: #e0e0e0;
    font-weight: bold;
}


.dropdown-option.focused {
    background-color: #e0e0e0;
}

.custom-dropdown:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 120, 250, 0.3);
}

.custom-dropdown:focus .dropdown-selected {
    border-color: #0078fa;
}
/* !---- CountryList Custom Dropdown Styles ---- */


/* Wizard steps styling */
.wizard-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    position: relative;
}

.wizard-steps:before {
    content: '';
    position: absolute;
    top: 15px;
    left: 0;
    right: 0;
    background: #ddd;
    z-index: 1;
}

.step {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 30%;
}

.step-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #ddd;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 5px;
    font-weight: bold;
}

.step.active .step-number {
    background: #007bff;
    color: white;
}

.step.completed .step-number {
    background: #28a745;
    color: white;
}

.step-label {
    font-size: 12px;
    color: #666;
}

.step.active .step-label {
    color: #007bff;
    font-weight: bold;
}

.step.completed .step-label {
    color: #28a745;
}

.form-step {
    display: none;
     min-height: 450px;
}

.form-step.active {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}

.button-group {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.button-group button {
    flex: 1;
}

/* Confirmation step styling */
.confirmation-details {
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    height: 300px;
    overflow-y: auto;
}

.confirmation-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f5f5f5;
}

.confirmation-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.confirmation-label {
    font-weight: 500;
    color: #555;
}

.confirmation-value {
    color: #333;
    text-align: right;
    margin-right: 10px;
}

.selected-destinations-confirm {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 5px;
    margin-left: 15px;
}

.selected-destination-tag {
    background: #e9ecef;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
}

/* PHONE STYLES */
.iti {
    width: 68%;
    margin-bottom: 12px;
}

.iti input, .iti__selected-flag {
    font-size: 13px;
}

.iti__country-list {
    width: 400%;
    height: 300%;
    font-size: 10px;
}

/* Make 'Destinations' label occupy full width */
.confirmation-row:has(#confirm-destinations) {
    flex-direction: column;
    align-items: flex-start;
}

.confirmation-row:has(#confirm-destinations) .confirmation-label {
    width: 100%;
    margin-bottom: 5px;
}

.confirmation-row:has(#confirm-destinations) .confirmation-value {
    text-align: left;
    width: 100%;
}

/* Responsive styles for mobile and tablet */
@media only screen and (max-width: 550px) {
    html, body {
        height: 100vh; /* Full height needed for vertical centering */
        margin: 0;
        padding: 0;
    }
    body {
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column; /* Optional, for better vertical stacking if needed */
        padding: 10px;
        box-sizing: border-box;
    }

    .container {
        margin: 0; /* Remove any default margin */
        transform: translateY(0); /* Ensure no transform interference */
        width: 75%;
    }

    /* Ensure form elements don't overflow */
    .form-group {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 8px;
        width: 100%;
        box-sizing: border-box;
    }

    /* Make all inputs same width and prevent overflow */
    .form-group input, 
    .form-group select,
    .custom-dropdown,
    .iti,
    .iti__selected-flag {
        width: 100% !important;
        max-width: 100% !important;
        flex: 1 1 100% !important;
        height: 36px;
        font-size: 11px;
        box-sizing: border-box;
    }

    /* Specifically fix phone input container */
    .iti {
        display: block;
        width: 100% !important;
    }

    /* Fix phone input field */
    .iti input {
        width: 100% !important;
        padding-left: 100px !important; /* Make room for flag dropdown */
    }

    /* Fix custom dropdown width */
    .custom-dropdown {
        width: 100% !important;
    }

    /* Fix date picker input */
    .flatpickr-input {
        width: 100% !important;
        box-sizing: border-box;
    }

    /* Full-width for visit dates input */
    .full-width {
        width: 100% !important;
        margin-left: 0;
        margin-right: 0;
    }

    /* Wizard steps adjustments */
    .wizard-steps {
        margin-bottom: 15px;
        width: 100%;
        box-sizing: border-box;
    }

    /* Destination list fixes */
    .selected-destinations {
        width: 100% !important;
        max-width: 100% !important;
        height: auto;
        box-sizing: border-box;
    }

    .destination-list {
        width: 100%;
        box-sizing: border-box;
    }
    
    .destination-list li {
        font-size: 10px !important;
        padding: 6px !important;
    }

    /* Search box fixes */
    .search-box {
        width: 100%;
        box-sizing: border-box;
    }

    #searchInput {
        width: 100% !important;
        box-sizing: border-box;
    }

    /* Match confirmation styles from 430px */
    #step3 h3 {
        font-size: 14px !important;
        margin-bottom: 16px !important;
    }

    .confirmation-details {
        padding: 10px !important;
    }

    .confirmation-row {
        margin-bottom: 6px !important;
        padding-bottom: 6px !important;
    }

    .confirmation-label, .confirmation-value {
        font-size: 12px !important;
    }

    .selected-destination-tag {
        font-size: 11px !important;
        padding: 2px 6px !important;
    }

    /* Flatpickr Calendar Popup for small screens */
    .flatpickr-calendar {
        font-size: 11px !important;
        width: 100% !important;
        max-width: 300px !important;
        box-sizing: border-box;         /* Ensures padding/border don't exceed width */
        transform: scale(0.95); /* Optional: slightly shrink the calendar */
        margin-top: -10px;
    }

    .flatpickr-day {
        padding: 0.35rem !important;
        line-height: 1.2 !important;
    }

    .flatpickr-months,
    .flatpickr-weekdays {
        font-size: 11px !important;
    }
}

/* Specific adjustments for iPhone 15 Pro (smaller screens) */
@media only screen and (max-width: 430px) {

    .form-step {
        min-height: 350px; /* Reduce overall form height */
        height: auto; 
        padding-bottom: 10px;
    }

    .form-group {
        margin-bottom: 2px !important; /* Reduce vertical spacing between inputs */
    }

    label {
        margin: 4px 0 2px !important;
        font-size: 12px !important;
    }

    input, select, .dropdown-selected {
        padding: 6px !important;
        font-size: 12px !important;
        height: 32px !important;
    }

    .custom-dropdown {
        width: 105% !important;
        max-width: 105% !important;
    }
    .dropdown-selected {
        height: 32px !important;
        line-height: 1 !important;
        padding-top: 4px !important;
        padding-bottom: 4px !important;
        box-sizing: border-box;
        overflow: hidden;
    }

    .selected-text, .dropdown-arrow {
        font-size: 12px !important;
        line-height: 1.2;
    }

    #step3 h3 {
        font-size: 14px !important;
        margin-bottom: 16px !important;
    }

    .confirmation-details {
        padding: 10px !important;
    }

    .confirmation-row {
        margin-bottom: 6px !important;
        padding-bottom: 6px !important;
    }

    .confirmation-label, .confirmation-value {
        font-size: 12px !important;
    }

    .selected-destination-tag {
        font-size: 11px !important;
        padding: 2px 6px !important;
    }

    .button-group {
        margin-top: 10px !important;
    }

    .button-group button {
        font-size: 13px !important;
        padding: 8px !important;
    }

    .custom-dropdown,
    .iti,
    .flatpickr-input {
        height: 32px !important;
    }

    /* Additional overflow protection */
    input, select, .dropdown-selected {
        max-width: calc(100% - 16px) !important; /* Account for padding */
    }

    /* Phone input specific fixes */
    .iti__selected-flag {
        padding-right: 6px;
    }

    .iti__country-list {
        width: 100% !important;
        max-width: 100vw !important;
        left: 0 !important;
        right: 0 !important;
    }

    /* Destination list fixes */
    .selected-destinations {
        width: 94% !important;
        max-width: 94% !important;
        height: auto;
        box-sizing: border-box;
    }
    
    .destination-list {
        width: 95%;
        box-sizing: border-box;
    }
    

    .destination-list li {
        font-size: 9px !important;
        padding: 2px !important;
        height: 20px;
    }

    .destination-list input[type="checkbox"] {
        transform: scale(0.70); /* or smaller */
        margin-right: 6px;
    }


    @media screen and (max-device-width: 430px) and (-webkit-min-device-pixel-ratio: 3) {
        input[type="date"] {
            -webkit-appearance: none;
            appearance: none;
            min-height: 36px;
            font-size: 13px;
            padding: 8px;
        }
    }
}
