/* Safari Fun CAPTCHA + Google reCAPTCHA wrapper */
.safari-captcha,
.google-captcha-wrapper {
    background: linear-gradient(135deg, #fef9e7 0%, #fdebd0 100%);
    border: 2px solid #f5b041;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 10px;
    position: relative;
    overflow: hidden;
}

.safari-captcha::before,
.google-captcha-wrapper::before {
    content: '🌿';
    position: absolute;
    right: -10px;
    top: -10px;
    font-size: 4rem;
    opacity: 0.15;
    transform: rotate(15deg);
}

.captcha-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.captcha-icon {
    font-size: 1.8rem;
    animation: safari-captcha-bounce 2s infinite;
}

@keyframes safari-captcha-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.captcha-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: #b7950b;
}

.captcha-subtitle {
    font-size: 0.85rem;
    color: #7d6608;
    font-style: italic;
}

.captcha-question {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 12px;
    padding: 10px 15px;
    background: white;
    border-radius: 10px;
    border-left: 4px solid #f5b041;
    transition: opacity 0.3s ease;
}

.captcha-input-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
}

.captcha-input {
    flex: 1;
    text-transform: lowercase;
}

.captcha-hint {
    cursor: help;
    padding: 8px 12px;
    background: #f5b041;
    border-radius: 8px;
    font-size: 0.85rem;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.captcha-hint:hover {
    background: #d4ac0d;
    transform: scale(1.05);
}

.captcha-refresh {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed #f5b041;
}

.btn-refresh-captcha {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    color: #7d6608;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-refresh-captcha:hover {
    background: rgba(245, 176, 65, 0.3);
    color: #5d4e06;
}

.btn-refresh-captcha:hover i {
    animation: safari-captcha-spin 0.5s ease;
}

@keyframes safari-captcha-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.btn-refresh-captcha.loading i {
    animation: safari-captcha-spin 1s linear infinite;
}

.btn-refresh-captcha:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.refresh-count {
    font-weight: 600;
    color: #b7950b;
}

.btn-refresh-captcha.no-refreshes {
    color: #dc3545;
}

.btn-refresh-captcha.no-refreshes .refresh-count {
    color: #dc3545;
}

.google-captcha-widget {
    padding: 10px 0;
}

/* Quiet caption style (design analysis: avoid heading-weight security block) */
.captcha-quiet {
    background: #f7f8fa;
    border: 1px solid #e2e6ee;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 10px;
    position: relative;
    overflow: visible;
}

.captcha-quiet::before {
    content: none;
    display: none;
}

.captcha-disclaimer {
    margin: 0 0 12px;
    font-size: 0.8rem;
    line-height: 1.45;
    color: #64748b;
    font-weight: 400;
    font-style: normal;
}

.captcha-quiet .captcha-question {
    font-size: 0.95rem;
    font-weight: 500;
    color: #1a1a2e;
    margin-bottom: 10px;
    padding: 10px 12px;
    background: #fff;
    border-radius: 8px;
    border-left: 3px solid #94a3b8;
}

.captcha-quiet .captcha-hint {
    background: #e2e8f0;
    color: #334155;
    font-size: 0.8rem;
    font-weight: 500;
}

.captcha-quiet .captcha-hint:hover {
    background: #cbd5e1;
    transform: none;
}

.captcha-quiet .captcha-refresh {
    border-top: 1px solid #e2e6ee;
}

.captcha-quiet .btn-refresh-captcha {
    color: #64748b;
}

.captcha-quiet .btn-refresh-captcha:hover {
    background: rgba(100, 116, 139, 0.08);
    color: #334155;
}

.captcha-quiet .refresh-count {
    color: #94a3b8;
}

@media (max-width: 576px) {
    .captcha-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .captcha-input-wrapper {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-refresh-captcha {
        font-size: 0.8rem;
        flex-wrap: wrap;
    }
}
