/* Default Styles (Desktop First) */
.form-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100%;
    /* Full width for responsiveness */
    padding: 20px;
}

.form-container {
    display: flex;
    flex-direction: column;
    max-width: 1200px;
    min-width: 500px;
    width: 100%;
    padding: 20px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.step-labels {
    display: flex;
    justify-content: space-evenly;
    margin-bottom: 5px;
    padding: 10px 0;
}

.step-label {
    flex: 1;
    text-align: center;
    font-weight: bold;
    color: #333;
    position: relative;
    padding: 10px;
    background: #ddd;
    transition: background 0.3s, color 0.3s;
}

.step-label.active {
    background: #8e24aa;
    color: white;
}

.progress-container {
    background-color: #ddd;
    border-radius: 5px;
    overflow: hidden;
    height: 8px;
    margin-bottom: 20px;
}

.progress-bar {
    height: 8px;
    background: #8e24aa;
    transition: width 0.4s ease-in-out;
}

.form-page {
    width: 100%;
    margin: auto;
    transition: all 0.3s ease-in-out;
    padding: 20px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 15px;
	padding-left:20px
}

button {
    background: #8e24aa;
    color: white;
    padding: 10px 15px;
    height: 40px;
    width: 100px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

button:hover {
    background: #6e1c85;
}

input:required,
select:required {
    border: 1px solid #ccc;
    transition: 0.3s;
}

input:required:focus,
select:required:focus {
    border: 2px solid #007bff;
}

input.error,
select.error {
    border: 2px solid red;
}

#add-tourist {
    width: 23%;
}

#tourist-container {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #ccc;
    transition: max-height 0.3s ease-in-out;
    padding-right: 10px;
    margin-bottom: 15px;
}

/* 🔽 Mobile (Below 768px) */
@media (max-width: 767px) {
    .form-wrapper {
        width: 95%;
        height: auto;
        padding: 10px;
    }

    .form-container {
        width: 100%;
        padding: 12px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .step-labels {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
        gap: 5px;
        padding: 5px 0;
    }

    .step-label {
        flex: 1;
        padding: 10px;
        font-size: 90%;
        min-width: 80px;
        text-align: center;
    }

    button {
        width: auto;
        min-width: 100px;
        max-width: 120px;
        font-size: 14px;
        padding: 8px;
        flex: 1;
        text-align: center;
    }
}

/* Extra small devices (e.g., portrait phones) */
@media (max-width: 480px) {
    .form-wrapper {
        width: 100%; /* Ensures full width */
        padding: 0 5px; /* Reduced padding to prevent overflow */
        overflow-x: auto; /* Allow horizontal scrolling if needed */
        margin: 0 auto; /* Center the form */
    }

    .form-container {
        width: 100%; /* Ensures the form takes full width */
        padding: 10px; /* Adds padding inside the form */
        box-sizing: border-box; /* Prevents overflow due to padding */
    }

    .step-labels {
        flex-direction: column; /* Stack the labels vertically */
        width: 100%; /* Ensure labels take full width */
        gap: 10px;
        padding: 10px 0;
    }

    .step-label {
        font-size: 13px;
        min-width: 100px;
        text-align: center; /* Center the labels */
        padding: 10px;
        width: 100%; /* Makes labels fill the container */
    }

    /* Input, Select, Button Adjustments */
    input, select, button {
        padding: 8px;
        font-size: 12px;
        width: 100%; /* Ensures input fields fill the container width */
    }

    /* Ensure grid layout works properly on smaller screens */
    .form-grid {
        display: grid;
        grid-template-columns: 1fr; /* Stack form inputs vertically */
        gap: 10px;
    }

    /* Buttons for Navigation */
    button {
        font-size: 16px;
        padding: 12px;
        margin-top: 10px;
        width: 100%; /* Makes buttons fill the full width */
    }

    /* Ensuring no part of the content gets cut off */
    .form-page {
        overflow-x: hidden; /* Prevents horizontal scrolling in form page */
        width: 100%;
    }
}



/* 🟨 Tablet (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
    .form-wrapper {
        width: 75%;
        padding: 15px;
    }

    .form-container {
        width: 100%;
        padding: 15px;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .step-labels {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
    }

    .step-label {
        padding: 10px;
        font-size: 95%;
        min-width: 100px;
        text-align: center;
    }

    button {
        width: 100%;
        font-size: 14px;
        padding: 10px;
    }
}

/* 🖥️ Desktop (Above 1024px) */
@media (min-width: 1025px) {
    .form-wrapper {
        width: 85%;
        height: auto;
        padding: 20px;
    }

    .form-container {
        width: 100%;
        padding: 20px;
        min-width: 600px;
    }

    .form-grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    .step-labels {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
        gap: 15px;
        padding: 10px 0;
    }

    .step-label {
        flex: 1;
        padding: 15px;
        font-size: 100%;
        min-width: 120px;
        text-align: center;
    }

    button {
        width: auto;
        min-width: 150px;
        max-width: 180px;
        font-size: 16px;
        padding: 10px;
        flex: 1;
        text-align: center;
    }
}




.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-content {
    background: #fff;
    padding: 20px 30px;
    border-radius: 10px;
    text-align: center;
    max-width: 400px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
}

#popup-close {
    margin-top: 15px;
    padding: 8px 16px;
    background: #8e24aa;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}