/* Authyo OTP for Fluent Forms - Frontend Styles */

.authyo-ff-wrap {
    margin-top: 10px;
    font-family: inherit;
}

/* ── Searchable Country Dropdown ─────────────────────────────────── */

.authyo-ff-country-dropdown {
    position: relative;
    flex-shrink: 0;
}

.authyo-ff-country-trigger {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 8px;
    height: 100%;
    min-width: 90px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-right: none;
    border-radius: 4px 0 0 4px;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    transition: background 0.15s;
    box-sizing: border-box;
}

.authyo-ff-country-trigger:hover {
    background: #f0f0f0;
}

.authyo-ff-country-trigger:focus {
    outline: 2px solid #2271b1;
    outline-offset: -1px;
}

.authyo-ff-country-locked .authyo-ff-country-trigger {
    cursor: not-allowed;
    opacity: 0.85;
}

.authyo-ff-country-hidden {
    display: none !important;
}

.authyo-ff-country-code {
    font-size: 13px;
    white-space: nowrap;
    color: #333;
}

.authyo-ff-country-arrow {
    font-size: 10px;
    opacity: 0.5;
}

/* Search wrap inside panel */
.authyo-ff-country-search-wrap {
    padding: 6px 8px;
    border-bottom: 1px solid #eee;
}

/* Panel */
.authyo-ff-country-panel {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 9999;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,.12);
    min-width: 220px;
    max-height: 260px;
    overflow: hidden;
}

.authyo-ff-country-panel.open {
    display: block;
    animation: authyo-dropdown-in 0.12s ease;
}

@keyframes authyo-dropdown-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Search box inside panel */
.authyo-ff-country-search {
    width: 100%;
    box-sizing: border-box;
    padding: 5px 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 13px;
    outline: none;
}

.authyo-ff-country-search:focus {
    border-color: #2271b1;
}

/* Country list */
.authyo-ff-country-list {
    margin: 0;
    padding: 0;
    list-style: none;
    overflow-y: auto;
    max-height: 200px;
}

.authyo-ff-country-item {
    padding: 7px 12px;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    gap: 8px;
    align-items: center;
    transition: background 0.1s;
}

.authyo-ff-country-item:hover,
.authyo-ff-country-item.authyo-ff-country-focused {
    background: #f0f6ff;
}

.authyo-ff-country-item.selected {
    background: #e8f0fe;
    font-weight: 600;
}

.authyo-ff-country-item .authyo-ff-dial {
    opacity: 0.6;
    min-width: 36px;
    font-size: 12px;
}

/* Phone/Smart input group: make trigger same height as input */
.authyo-ff-phone-group,
.authyo-ff-smart-input-group {
    display: flex;
    align-items: stretch;
    gap: 0;
}

.authyo-ff-phone-group .authyo-ff-country-dropdown,
.authyo-ff-smart-input-group .authyo-ff-country-dropdown {
    display: flex;
    align-items: stretch;
}

.authyo-ff-phone-group .authyo-ff-country-trigger,
.authyo-ff-smart-input-group .authyo-ff-country-trigger {
    height: auto;
    align-self: stretch;
}

/* ── OTP Wrap Animations ─────────────────────────────────────────── */

.authyo-ff-otp-row {
    overflow: hidden;
}

/* ── Submit Button Disabled State ───────────────────────────────── */

.authyo-ff-btn-disabled,
.authyo-ff-btn-disabled:hover {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

/* Status Messages */
.authyo-ff-status {
    margin-top: 5px;
    padding: 5px 0;
    font-size: 13px;
    min-height: 20px;
}

/* Method Selector */
.authyo-ff-method-selector {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 10px 0;
    padding: 15px;
    border: 1px solid #2271b1;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border-left: 5px solid #00a32a;
}

.authyo-ff-method-selector-label {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 5px;
    color: #1d2327;
}

.authyo-ff-method-buttons-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Verified State UI */
.authyo-ff-verified-state {
    display: none;
    margin-top: 10px;
    padding: 12px 16px;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-left: 4px solid #155724;
    border-radius: 4px;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.authyo-ff-verified-state.show {
    display: flex;
}

.authyo-ff-verified-message {
    color: #155724;
    font-size: 15px;
    line-height: 1.5;
    font-weight: 500;
}

.authyo-ff-verified-checkmark {
    font-size: 18px;
    margin-left: 5px;
}

.authyo-ff-change-btn {
    background: #e0e0e0 !important;
    color: #000 !important;
    border: 1px solid #bdbdbd !important;
    padding: 6px 12px !important;
    font-size: 13px !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
}

.authyo-ff-change-btn:hover {
    background: #d0d0d0 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
}

/* Fallback Channels */
.authyo-ff-fallback-channels {
    margin-top: 15px;
    padding: 12px;
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 4px;
}

.authyo-ff-fallback-label {
    margin: 0 0 8px 0;
    font-size: 13px;
    font-weight: 600;
    color: #444;
}

/* Countdown */
.authyo-ff-countdown {
    font-size: 12px;
    color: #888;
    margin-left: 5px;
}

.authyo-ff-resend.disabled {
    opacity: 0.5;
    pointer-events: none;
    cursor: default;
    text-decoration: none;
}