/* === Main Wrapper (if used) === */
.authyo-wrapper {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 15px;
    margin: 10px 0;
    transition: all 0.3s ease;
}

/* === Button Styling === */
.authyo-btn-send,
.authyo-btn-verify {
    background-color: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s;
}

.authyo-btn-send:hover,
.authyo-btn-verify:hover {
    background-color: #005177;
}

.authyo-btn-send:disabled,
.authyo-btn-verify:disabled {
    opacity: 0.6;
    cursor: default;
}

/* === OTP Control Group === */
.authyo-otp-group {
    margin-top: 10px;
    position: relative;
    z-index: 1;
    /* Below dropdown */
}

.authyo-otp-verify-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.authyo-otp-input {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    width: 120px;
    text-align: center;
    letter-spacing: 2px;
}

.authyo-msg {
    font-size: 13px;
    margin-top: 5px;
    min-height: 18px;
}

.authyo-msg.success {
    color: #46b450;
}

.authyo-msg.error {
    color: #dc3232;
}


/* === Country Dropdown === */
/* === Phone Input Group === */
.authyo-phone-input-group {
    display: flex;
    align-items: stretch;
    gap: 10px;
    width: 100%;
}

.authyo-phone-input-group .authyo-phone-field {
    flex: 1;
    width: auto !important;
    /* Override metform width */
}


/* === Country Dropdown === */
.authyo-country-wrapper {
    position: relative;
    /* Align closely with input */
    display: flex;
    /* Changed from inline-block for better alignment */
    /* width: auto; Let it size by content */
}

/* MetForm specific: Try to make it inline if possible, or stacked */
.authyo-country-selected {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    min-width: 120px;
    /* Reduced min-width slightly */
    user-select: none;
    height: 100%;
    /* Match input height if stretched */
    box-sizing: border-box;
}

.authyo-country-selected .flag {
    font-size: 1.2em;
}

.authyo-country-selected .arrow {
    margin-left: auto;
    font-size: 10px;
    color: #666;
}

.authyo-country-list {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 250px;
    max-height: 300px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 2147483647;
    margin-top: 5px;
    /* Spacing */
}


.authyo-search {
    padding: 8px;
    background: #f9f9f9;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
}

.authyo-search input {
    width: 100%;
    padding: 6px;
    border: 1px solid #ddd;
    border-radius: 3px;
    box-sizing: border-box;
}



.authyo-item {
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: background 0.2s;
}

.authyo-item:hover {
    background: #f0f0f0;
}

.authyo-item .flag {
    width: 20px;
    text-align: center;
}

.authyo-item .name {
    flex: 1;
    font-size: 13px;
    color: #333;
}

.authyo-item .dial {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

/* Scrollbar */
.authyo-country-list::-webkit-scrollbar {
    width: 6px;
}

.authyo-country-list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

/* MetForm Integration Tweaks */
/* Disabled submit button */
.authyo-disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

/* Spinner */
.authyo-spinner {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-top-color: #0073aa;
    border-radius: 50%;
    animation: authyo-spin 1s linear infinite;
    margin-left: 5px;
}

@keyframes authyo-spin {
    to {
        transform: rotate(360deg);
    }
}

/* === Method Selector === */
/* === Method Selector === */
.authyo-method-selector {
    margin-top: 10px;
}

.authyo-method-box {
    border: 1px solid #1e8cbe;
    border-left: 4px solid #00d084;
    padding: 15px 20px;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

.authyo-method-selector-message {
    font-size: 14px;
    margin-bottom: 12px;
    color: #333;
    font-weight: 600;
}

.authyo-method-selector-buttons {
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.authyo-method-selector-btn {
    flex: 1;
    /* Equal width */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 15px;
    border: 1px solid #0073aa;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    color: #0073aa;
    font-weight: 600;
    transition: all 0.2s ease;
    text-transform: capitalize;
}

.authyo-method-selector-btn:hover {
    background: #f0f6fc;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.authyo-method-selector-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

.authyo-method-selector-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    color: #0073aa;
}

/* === Timer === */
.authyo-countdown {
    margin-left: 8px;
    font-size: 13px;
    color: #666;
    font-weight: 500;
    display: inline-block;
    min-width: 24px;
}

/* === Visual Hidden Helper === */
.authyo-visually-hidden {
    position: absolute !important;
    opacity: 0 !important;
    height: 1px !important;
    width: 1px !important;
    overflow: hidden !important;
    clip: rect(1px 1px 1px 1px) !important;
    /* IE6, IE7 */
    clip: rect(1px, 1px, 1px, 1px) !important;
    white-space: nowrap !important;
    /* added line */
    pointer-events: none !important;
}

/* === Fallback UI === */
.authyo-fallback {
    background: #f0fff4;
    border: 1px solid #00d084;
    border-left: 4px solid #00d084;
    padding: 15px;
    border-radius: 4px;
    margin-top: 15px;
}

.authyo-fallback-message {
    font-size: 14px;
    margin-bottom: 12px;
    color: #333;
    font-weight: 600;
    margin-top: 0;
}

.authyo-fallback-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.authyo-fallback-btn {
    flex: 1;
    min-width: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid #00d084;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    color: #333;
    font-weight: 600;
    transition: all 0.2s;
}

.authyo-fallback-btn:hover:not(:disabled) {
    background: #e6fff0;
    border-color: #00a368;
}

.authyo-fallback-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f5f5f5;
    border-color: #ddd;
    color: #888;
}

.authyo-fallback-btn.active {
    border-style: dashed;
}

.authyo-fallback-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    color: #666;
}