/**
 * Cashback Contact Form — soft / neumorphic-lite restyle.
 * Token-driven (--cb-* from woodmart-child design system) so palette,
 * radii and shadows stay consistent with the rest of the cabinet.
 *
 * @since 2.1.0
 */

/* Cashback plugin — frontend token override (2026-05). */
:root {
    --cb-accent: rgb(69, 85, 232);
    --cb-accent-hover: rgb(91, 108, 247);
    --cb-warm: rgb(247, 107, 65);
    --cb-warm-hover: rgb(255, 138, 101);
    --cb-radius-pill: 10px;
}

.cb-contact-form-wrap {
    max-width: 640px;
    margin: 0 auto;
}

.cb-contact-form-wrap form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.cb-contact-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: var(--cb-text-primary, #16151c);
}

.cb-contact-field label .required {
    color: var(--cb-danger, #e5484d);
    margin-left: 2px;
}

.cb-contact-field input[type="text"],
.cb-contact-field input[type="email"],
.cb-contact-field textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--cb-border-strong, rgba(22, 21, 28, 0.12));
    border-radius: var(--cb-radius-sm, 10px);
    font-size: 14px;
    line-height: 1.5;
    color: var(--cb-text-primary, #16151c);
    background: var(--cb-bg-surface, #fff);
    box-shadow: var(--cb-shadow-inset, inset 0 1px 2px rgba(22, 21, 28, 0.05));
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    box-sizing: border-box;
    font-family: inherit;
}

.cb-contact-field input:focus,
.cb-contact-field textarea:focus {
    border-color: var(--cb-border-focus, rgba(91, 108, 247, 0.45));
    outline: none;
    box-shadow: var(--cb-shadow-focus, 0 0 0 3px rgba(91, 108, 247, 0.25)),
                var(--cb-shadow-inset, inset 0 1px 2px rgba(22, 21, 28, 0.05));
}

.cb-contact-field input.cb-field-error,
.cb-contact-field textarea.cb-field-error {
    border-color: var(--cb-danger, #e5484d);
    background: var(--cb-danger-soft, #fbe0e1);
}

.cb-contact-field textarea {
    resize: vertical;
    min-height: 120px;
}

/* CAPTCHA */
.cb-contact-captcha {
    display: flex;
    justify-content: flex-start;
}

/* Submit row */
.cb-contact-submit-row {
    padding-top: 4px;
}

#cb-contact-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 32px;
    min-height: 2.625rem;
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
    color: var(--cb-text-on-accent, #fff);
    background-color: var(--cb-accent, #5b6cf7);
    border: none;
    border-radius: var(--cb-radius-pill, 999px);
    box-shadow: var(--cb-shadow-soft, 0 8px 24px -12px rgba(15, 18, 34, 0.10));
    cursor: pointer;
    font-family: inherit;
    transition: background-color 0.15s ease, box-shadow 0.2s ease,
                opacity 0.2s ease, transform 0.2s ease;
}

#cb-contact-submit:hover {
    background-color: var(--cb-accent-hover, #4555e8);
    box-shadow: var(--cb-shadow-raised, 0 18px 36px -16px rgba(15, 18, 34, 0.14));
    transform: translateY(-1px);
}

#cb-contact-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Messages */
.cb-contact-messages {
    padding: 12px 16px;
    border-radius: var(--cb-radius-md, 16px);
    font-size: 14px;
    line-height: 1.5;
    margin-top: 4px;
    border: none;
}

.cb-contact-messages.cb-msg-success {
    background: var(--cb-success-soft, #dcf5eb);
    border-left: 3px solid var(--cb-success, #1fae7f);
    color: #14724f;
}

.cb-contact-messages.cb-msg-error {
    background: var(--cb-danger-soft, #fbe0e1);
    border-left: 3px solid var(--cb-danger, #e5484d);
    color: #a32328;
}

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

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

/* Responsive */
@media (max-width: 480px) {
    .cb-contact-form-wrap {
        padding: 0 8px;
    }

    #cb-contact-submit {
        width: 100%;
    }
}
