/* =============================================================================
   Silent Guard — Honeypot
   ============================================================================= */
.sg-hp-wrap {
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

/* =============================================================================
   Silent Guard — "Я не робот" checkbox widget
   ============================================================================= */
.sg-captcha-wrap {
    margin: 16px 0;
}

/* Внутри CF7 форм — чуть больше отступ сверху */
.wpcf7-form .sg-captcha-wrap {
    margin-top: 20px;
}

.sg-captcha-box {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 300px;
    max-width: 100%;
    padding: 14px 16px;
    background: #fff;
    border: 1.5px solid #d1d5db;
    border-radius: 14px;
    cursor: pointer;
    user-select: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.3s ease;
    outline: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.sg-captcha-box:hover {
    border-color: #1E3A5F;
    box-shadow: 0 2px 10px rgba(30, 58, 95, 0.12);
}

.sg-captcha-box:focus-visible {
    border-color: #1E3A5F;
    box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.18);
}

.sg-captcha-box.sg-checked {
    border-color: #16a34a;
    background: #f0fdf4;
    box-shadow: 0 1px 4px rgba(22, 163, 74, 0.15);
}

/* Inner row: circle + label */
.sg-captcha-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

/* Circle */
.sg-captcha-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid #d1d5db;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    transition: border-color 0.25s ease, background 0.25s ease;
}

.sg-captcha-box.sg-loading .sg-captcha-circle {
    border-color: #1E3A5F;
}

.sg-captcha-box.sg-checked .sg-captcha-circle {
    border-color: #16a34a;
    background: #16a34a;
}

/* Spinner ring */
.sg-captcha-spinner {
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: #1E3A5F;
    opacity: 0;
    transition: opacity 0.15s ease;
    animation: sg-spin 0.65s linear infinite;
}

.sg-captcha-box.sg-loading .sg-captcha-spinner {
    opacity: 1;
}

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

/* Checkmark SVG */
.sg-captcha-check {
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.4) rotate(-10deg);
    transition: opacity 0.22s ease 0.08s, transform 0.22s ease 0.08s;
}

.sg-captcha-check svg {
    width: 15px;
    height: 15px;
    stroke-dasharray: 22;
    stroke-dashoffset: 22;
    transition: stroke-dashoffset 0.28s ease 0.12s;
}

.sg-captcha-box.sg-checked .sg-captcha-check {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

.sg-captcha-box.sg-checked .sg-captcha-check svg {
    stroke-dashoffset: 0;
}

/* Label text */
.sg-captcha-label {
    font-size: 15px;
    font-weight: 500;
    color: #1E3A5F;
    line-height: 1;
    transition: color 0.25s ease;
}

.sg-captcha-box.sg-checked .sg-captcha-label {
    color: #15803d;
}

/* Brand badge — right side */
.sg-captcha-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding-left: 12px;
    border-left: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.sg-captcha-badge-icon {
    width: 22px;
    height: 22px;
    color: #1E3A5F;
}

.sg-captcha-badge-text {
    font-size: 9px;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    line-height: 1;
}

/* Error state — when form tries to submit without checking */
.sg-captcha-box.sg-error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
    animation: sg-shake 0.35s ease;
}

@keyframes sg-shake {
    0%, 100% { transform: translateX(0); }
    20%       { transform: translateX(-5px); }
    40%       { transform: translateX(5px); }
    60%       { transform: translateX(-4px); }
    80%       { transform: translateX(4px); }
}
