/* Modal Overlay */
#email-auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(2px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

/* Show modal when active */
#email-auth-modal.active {
    display: flex;
    animation: fadeIn 0.3s ease-out;
}

/* Modal Content */
.woocommerce-auth-modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    font-family: inherit;
    outline: none;
}

/* Responsive Design */
@media (max-width: 480px) {
    .woocommerce-auth-modal-content {
        max-width: 90%;
        padding: 20px;
    }
}

/* Close Button */
.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    font-size: 22px;
    color: #999;
    cursor: pointer;
}
.modal-close:hover,
.modal-close:focus {
    color: #333;
    outline: 2px solid #007cba;
}

/* Input Styling */
.input-text {
    width: 100%;
    padding: 10px;
    border-radius: 5px;
    font-size: 15px;
    box-sizing: border-box;
}
.input-text:focus {
    outline: 2px solid #007cba;
}

/* Buttons */
.woocommerce-Button.button {
    width: 100%;
    padding: 12px;
    font-size: 15px;
    text-align: center;
    border-radius: 5px;
    cursor: pointer;
}
.woocommerce-Button.button.loading::after {
    content: ' ⏳';
}

/* Back Button */
#step-back {
    margin-top: 10px;
    z-index: 10;
}

/* Step transitions */
.form-step {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    display: none;
}
.form-step.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Form spacing */
.woocommerce-form-row {
    margin-bottom: 15px;
}

/* Label styles */
.form-label {
    font-size: 14px;
    margin-bottom: 10px;
    color: #333;
}

/* Messages */
.woocommerce-message,
.woocommerce-error {
    padding: 10px;
    border-radius: 5px;
    font-size: 14px;
    margin-top: 10px;
}
.woocommerce-message {
    background: #e0f7e0;
    color: #2e7d32;
}
.woocommerce-error {
    background: #ffebee;
    color: #d32f2f;
}

/* Utility */
.hidden {
    display: none !important;
}

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.input-error {
    border: 1px solid #d32f2f;
    background: #ffecec;
}
.error-text {
    color: #d32f2f;
    font-size: 13px;
    margin-top: 5px;
}

/* Container must be relatively positioned to anchor the dropdown */
.woocommerce-auth-modal-content {
    position: relative;
    overflow: visible;
}

/* Force dropdown to center within modal */
.woocommerce-auth-modal-content .iti__country-list {
    position: absolute !important;
    top: 50% !important;
    left: 57% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 10001 !important;
    width: 280px; /* or auto */
    max-height: 250px;
    overflow-y: auto;
    font-size: 14px;
    direction: ltr !important;
    text-align: left !important;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Match phone input appearance to other inputs */
.iti input[type="tel"] {
    width: 100%;
    padding: 10px;
    font-size: 15px;
    border-radius: 5px;
    box-sizing: border-box;
    border: 1px solid #ccc;
    font-family: inherit;
    direction: ltr;
}

.iti input[type="tel"]:focus {
    outline: 2px solid #007cba;
}

/* Match height of dropdown and button */
.iti .iti__flag-container {
    height: 100%;
}

@media (min-width: 1025px) {
    .iti.iti--container {
        top: 90% !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
    }
}

.woocommerce-form-row {
    width: 100%;
    box-sizing: border-box;
}

/* Force .iti (intl-tel-input wrapper) to match sibling inputs */
.iti {
    width: 100% !important;
    box-sizing: border-box;
}
.iti__arrow {
    margin-left: -2px !important;
    margin-right: 2px !important;
}

.iti-mobile .iti__country-list{
    width:85% !important;
}

.iti__selected-flag {
	direction:ltr !important;
}

.iti__selected-dial-code {
	margin:3px !important;
}