/**
 * User Verification Plugin — Frontend styles.
 *
 * @package UserVerification
 */

/* ─── Registration form wrapper ─── */
.uvp-registration-wrap {
    max-width: 480px;
    margin: 40px auto;
    padding: 0 20px;
}

/* ─── Card ─── */
.uvp-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.uvp-card__title {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 8px;
}

.uvp-card__subtitle {
    font-size: 15px;
    color: #6b7280;
    margin: 0 0 24px;
    line-height: 1.5;
}

.uvp-card__footer {
    font-size: 14px;
    color: #6b7280;
    text-align: center;
    margin: 24px 0 0;
    padding-top: 20px;
    border-top: 1px solid #f3f4f6;
}

.uvp-card__footer a {
    color: #2666b0;
    text-decoration: none;
    font-weight: 600;
}

.uvp-card__footer a:hover {
    text-decoration: underline;
}

/* ─── Form elements ─── */
.uvp-form__field {
    margin-bottom: 18px;
}

.uvp-form__label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.uvp-form__input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 15px;
    color: #1a1a1a;
    background: #fff;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.uvp-form__input:focus {
    outline: none;
    border-color: #2666b0;
    box-shadow: 0 0 0 3px rgba(38, 102, 176, 0.1);
}

.uvp-form__input::placeholder {
    color: #9ca3af;
}

/* ─── Buttons ─── */
.uvp-btn {
    display: inline-block;
    width: 100%;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s, opacity 0.2s;
    box-sizing: border-box;
}

.uvp-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.uvp-btn--primary {
    background-color: #2666b0;
    color: #ffffff;
}

.uvp-btn--primary:hover:not(:disabled) {
    background-color: #1e5498;
}

/* ─── Cooldown state ─── */
.uvp-btn--cooldown {
    background-color: #94a3b8 !important;
    color: #e2e8f0 !important;
    opacity: 1 !important;
    position: relative;
    overflow: hidden;
}

.uvp-input--disabled {
    background-color: #f3f4f6 !important;
    color: #9ca3af !important;
    cursor: not-allowed;
}

/* ─── Cooldown progress bar ─── */
.uvp-cooldown-wrap {
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    margin-top: 10px;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.3s;
}

.uvp-cooldown-wrap--active {
    opacity: 1;
}

.uvp-cooldown-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #2666b0, #5a9fd4);
    border-radius: 2px;
    transition: width 0.3s linear;
}

/* ─── Notices ─── */
.uvp-notice {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.5;
}

.uvp-notice--success {
    background-color: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.uvp-notice--error {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.uvp-notice--info {
    background-color: #eff6ff;
    color: #1e5498;
    border: 1px solid #bfdbfe;
}

/* ─── Turnstile widget ─── */
.cf-turnstile {
    margin-top: 16px;
}

/* ─── Message (logged-in notice) ─── */
.uvp-message {
    text-align: center;
    padding: 20px;
    color: #6b7280;
    font-size: 15px;
}

/* ─── Loading spinner ─── */
.uvp-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: uvp-spin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

@keyframes uvp-spin {
    to { transform: rotate(360deg); }
}

/* ─── Email typo suggestion banner ─── */
.uvp-typo-banner {
    background-color: #fefce8;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 18px;
}

.uvp-typo-banner--inline {
    margin-top: 10px;
    margin-bottom: 0;
}

.uvp-typo-banner__text {
    font-size: 14px;
    color: #92400e;
    margin: 0 0 10px;
    line-height: 1.5;
}

.uvp-typo-banner__text strong {
    color: #78350f;
}

.uvp-typo-banner__actions {
    display: flex;
    gap: 8px;
}

.uvp-btn-sm {
    padding: 6px 14px;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background-color 0.15s;
}

.uvp-btn-sm--accept {
    background-color: #2666b0;
    color: #fff;
}

.uvp-btn-sm--accept:hover {
    background-color: #1e5498;
}

.uvp-btn-sm--reject {
    background-color: #e5e7eb;
    color: #374151;
}

.uvp-btn-sm--reject:hover {
    background-color: #d1d5db;
}

/* ─── Responsive ─── */
@media (max-width: 520px) {
    .uvp-registration-wrap {
        padding: 0 12px;
        margin: 20px auto;
    }

    .uvp-card {
        padding: 24px 20px;
    }
}
