/* General Body Styling */
body {
    font-family: Arial, sans-serif;
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 12px;
    background-color: #fff;
}

h1 {
    color: #2c3e50;
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 20px;
}

.page {
    background-color: #f7f7f7;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #f0f0f0;
    margin-bottom: 20px;
}

/* Label and Input Fields */
label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
    width: 100%;
    padding: 14px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 14px;
    margin-bottom: 16px;
    box-sizing: border-box;
}

.email-section{
    display: flex; align-items: center; gap: 10px;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.4);
}

/* Required asterisk (FIXED: Close to label text) */
/* Red asterisk for required fields */
label.required::after {
    content: " *";
    color: red;
    margin-left: 2px;
    font-size: 16px;
}


label:has(+ input[required]),
label:has(+ select[required]) {
    position: relative;
    display: inline-block;
}

label:has(+ input[required])::after,
label:has(+ select[required])::after {
    content: " *";
    color: red;
    margin-left: 2px;
    font-size: 18px;
    display: inline;
}

/* Navigation Buttons */
button {
    padding: 12px 30px;
    background-color: #8e44ad;
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #672584;
}

/* Step navigation styling */
.navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

.hidden {
    display: none;
}

.page h2 {
    color: #8e44ad;
    font-size: 26px;
    margin-bottom: 16px;
}

/* Footer section */
.footer-text {
    font-size: 14px;
    text-align: center;
    color: #999;
}

/* Button group style for Previous and Next buttons */
.navigation button:first-child {
    background-color: #7f8c8d;
}

.navigation button:first-child:hover {
    background-color: #5f6a6a;
}

/* Wrap intl-tel-input in full width */
.iti {
    width: 100%;
}

/* Style the phone input to match other inputs */
.iti input[type="tel"] {
    width: 100%;
    padding: 14px 12px 14px 50px !important;
    /* space for flag */
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 14px;
    box-sizing: border-box;
}

.iti input[type="tel"] {
    padding-left: 80px !important;
    /* or 60px if needed */
}

.iti__flag-container {
    padding-left: 10px;
    /* add some spacing */
    display: flex;
    align-items: center;
}

/* Focus style (matches your form inputs) */
.iti input[type="tel"]:focus {
    outline: none;
    border-color: #3498db !important;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.4);
}

/* Dropdown arrow */
.iti__arrow {
    border-top-color: #555 !important;
}

/* Dropdown list styling */
.iti__country-list {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-size: 14px;
}

/* Highlighted country */
.iti__country.iti__highlight {
    background-color: #f0f0f0;
}

/* Country items */
.iti__country {
    padding: 8px 10px;
}

/* Consistent label spacing */
label[for="phone"] {
    margin-bottom: 8px;
    display: block;
}

/* Fix flag alignment */
.iti__flag-container {
    padding: 0 8px;
    display: flex;
    align-items: center;
}

.success-box {
    background-color: #e8f9f0;
    border-left: 6px solid #27ae60;
    padding: 20px;
    border-radius: 10px;
    font-size: 18px;
    color: #2c3e50;
    margin-top: 30px;
    display: none;
    animation: fadeIn 0.6s ease-out;
}

.success-box.show {
    display: block;
}

/* Smooth fade-in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
