/**
 * Guard Dog 2FA Setup Interstitial Styles
 *
 * Styles for the 2FA setup page shown during login when enforcement requires setup.
 * Designed to match WordPress login page aesthetics.
 *
 * @package GuardDog
 * @since 1.9.1
 */

/* Container */
.guard-dog-2fa-setup-container {
    max-width: 400px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #c3c4c7;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    padding: 26px 24px;
}

/* Header */
.guard-dog-2fa-setup-header {
    text-align: center;
    margin-bottom: 24px;
}

.guard-dog-2fa-setup-icon {
    margin-bottom: 16px;
}

.guard-dog-2fa-setup-icon .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    color: #2271b1;
}

.guard-dog-2fa-setup-header h2 {
    font-size: 20px;
    font-weight: 400;
    margin: 0 0 12px;
    color: #1d2327;
}

.guard-dog-2fa-setup-header .description {
    color: #50575e;
    font-size: 13px;
    line-height: 1.5;
    margin: 0;
}

/* Error message */
.guard-dog-2fa-setup-error {
    background: #fcf0f1;
    border-left: 4px solid #d63638;
    padding: 12px;
    margin-bottom: 20px;
}

.guard-dog-2fa-setup-error p {
    margin: 0;
    color: #d63638;
    font-size: 13px;
}

/* Method cards */
.guard-dog-2fa-setup-methods {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.guard-dog-2fa-method-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    background: #f6f7f7;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.guard-dog-2fa-method-card:hover {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

.guard-dog-2fa-method-card .method-icon {
    flex-shrink: 0;
}

.guard-dog-2fa-method-card .method-icon .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
    color: #2271b1;
}

.guard-dog-2fa-method-card .method-content {
    flex: 1;
    min-width: 0;
}

.guard-dog-2fa-method-card .method-content h3 {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 4px;
    color: #1d2327;
}

.guard-dog-2fa-method-card .method-description {
    font-size: 12px;
    color: #646970;
    margin: 0;
    line-height: 1.4;
}

.guard-dog-2fa-method-card .guard-dog-setup-method-btn {
    flex-shrink: 0;
}

/* Setup sections */
.guard-dog-setup-section {
    margin-top: 0;
}

.guard-dog-setup-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #c3c4c7;
}

.guard-dog-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: #2271b1;
    cursor: pointer;
    padding: 0;
    font-size: 13px;
}

.guard-dog-back-btn:hover {
    color: #135e96;
}

.guard-dog-back-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.guard-dog-setup-section-header h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    color: #1d2327;
}

/* Instructions */
.guard-dog-totp-instructions,
.guard-dog-email-instructions,
.guard-dog-passkey-instructions {
    margin-bottom: 20px;
}

.guard-dog-totp-instructions ol,
.guard-dog-passkey-instructions ol {
    margin: 0;
    padding-left: 20px;
}

.guard-dog-totp-instructions li,
.guard-dog-passkey-instructions li {
    font-size: 13px;
    color: #50575e;
    margin-bottom: 6px;
    line-height: 1.5;
}

.guard-dog-email-instructions p,
.guard-dog-passkey-instructions p {
    font-size: 13px;
    color: #50575e;
    margin: 0 0 12px;
    line-height: 1.5;
}

/* TOTP QR Code section */
.guard-dog-totp-qr-container {
    text-align: center;
    margin-bottom: 20px;
    padding: 20px;
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 4px;
}

.guard-dog-qr-code {
    margin-bottom: 16px;
}

.guard-dog-qr-code img {
    max-width: 200px;
    height: auto;
    border: 4px solid #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.guard-dog-qr-loading {
    padding: 60px 20px;
    color: #646970;
    font-size: 13px;
}

.guard-dog-qr-loading .spinner {
    float: none;
    margin: 0 8px 0 0;
}

.guard-dog-totp-secret {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.guard-dog-totp-secret label {
    font-size: 12px;
    color: #646970;
}

.guard-dog-totp-secret code {
    font-family: Consolas, Monaco, monospace;
    font-size: 14px;
    background: #fff;
    padding: 4px 8px;
    border: 1px solid #dcdcde;
    border-radius: 2px;
    user-select: all;
}

.guard-dog-copy-btn {
    font-size: 12px !important;
    padding: 2px 8px !important;
}

.guard-dog-copy-btn.copied {
    background: #00a32a !important;
    border-color: #00a32a !important;
    color: #fff !important;
}

/* Verify form */
.guard-dog-verify-form {
    margin-top: 20px;
}

.guard-dog-verify-input-group {
    margin-bottom: 16px;
}

.guard-dog-verify-input-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #1d2327;
}

.guard-dog-verify-input-group input.input {
    width: 100%;
    font-size: 24px;
    text-align: center;
    letter-spacing: 0.3em;
    padding: 8px;
}

.guard-dog-setup-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.guard-dog-setup-actions .button-large {
    width: 100%;
    text-align: center;
    padding: 8px 16px;
    height: auto;
    font-size: 14px;
}

/* Email send section */
.guard-dog-email-send-section {
    text-align: center;
    margin-bottom: 20px;
}

.guard-dog-email-send-section .button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.guard-dog-email-send-section .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.guard-dog-email-status,
.guard-dog-passkey-status {
    display: block;
    margin-top: 12px;
    font-size: 13px;
    color: #646970;
}

.guard-dog-email-status.success,
.guard-dog-passkey-status.success {
    color: #00a32a;
}

.guard-dog-email-status.error,
.guard-dog-passkey-status.error {
    color: #d63638;
}

/* Passkey section */
.guard-dog-passkey-register-section {
    text-align: center;
    margin-bottom: 20px;
}

.guard-dog-passkey-register-section .button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.guard-dog-passkey-register-section .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.guard-dog-passkey-name-section {
    margin-top: 16px;
}

.guard-dog-passkey-name-section label {
    display: block;
    font-size: 13px;
    color: #646970;
    margin-bottom: 6px;
}

.guard-dog-passkey-name-section input {
    width: 100%;
}

/* Form error */
.guard-dog-form-error {
    background: #fcf0f1;
    border-left: 4px solid #d63638;
    padding: 10px 12px;
    margin-bottom: 16px;
    font-size: 13px;
    color: #d63638;
}

/* Back to blog link */
#backtoblog {
    margin-top: 20px;
    text-align: center;
}

/* Responsive adjustments */
@media screen and (max-width: 480px) {
    .guard-dog-2fa-setup-container {
        padding: 20px 16px;
    }

    .guard-dog-2fa-method-card {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }

    .guard-dog-2fa-method-card .guard-dog-setup-method-btn {
        width: 100%;
    }

    .guard-dog-totp-secret {
        flex-direction: column;
    }
}
