/* Decode CRM Public Form Styles - 100% Theme-Adaptive & Inherited */
.decode-form-wrapper {
    box-sizing: border-box;
    width: 100%;
    margin: 1.5rem 0;
    font-family: inherit;
    color: inherit;
}

.decode-form-card {
    background: var(--color-surface-container-high, var(--color-surface, var(--form-bg, #ffffff)));
    color: var(--color-on-surface, var(--form-color, inherit));
    border: 1px solid var(--color-primary-container, var(--color-outline, rgba(0, 240, 255, 0.2)));
    border-radius: var(--border-radius, 12px);
    padding: 1.75rem;
    box-shadow: var(--box-shadow, 0 4px 20px rgba(0, 0, 0, 0.15));
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
}

.decode-form-header {
    margin-bottom: 1.5rem;
}

.decode-form-title {
    font-family: inherit;
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0 0 0.4rem 0;
    color: var(--color-primary-container, var(--color-heading, inherit));
}

.decode-form-subtitle {
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--color-on-surface-variant, var(--color-subtext, opacity: 0.8));
    margin: 0;
    line-height: 1.5;
}

.decode-form-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1.25rem;
}

.decode-field-col-12 { grid-column: span 12; }
.decode-field-col-6  { grid-column: span 6; }
.decode-field-col-4  { grid-column: span 4; }

@media (max-width: 640px) {
    .decode-field-col-6,
    .decode-field-col-4 {
        grid-column: span 12;
    }
}

.decode-form-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.decode-form-label {
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-on-surface-variant, var(--color-label, inherit));
}

.decode-form-label span.required {
    color: #ef4444;
    margin-left: 2px;
}

.decode-form-input,
.decode-form-select,
.decode-form-textarea {
    font-family: inherit;
    font-size: 0.9rem;
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-outline-variant, var(--input-border, rgba(0, 240, 255, 0.2)));
    border-radius: 6px;
    background: var(--color-surface, var(--input-bg, rgba(255, 255, 255, 0.05)));
    color: var(--color-on-surface, var(--input-color, inherit));
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.decode-form-input:focus,
.decode-form-select:focus,
.decode-form-textarea:focus {
    border-color: var(--color-primary-container, #00f0ff);
    box-shadow: 0 0 12px var(--color-primary-container, rgba(0, 240, 255, 0.3));
}

.decode-form-textarea {
    resize: vertical;
    min-height: 110px;
}

.decode-form-submit-btn {
    font-family: inherit;
    width: 100%;
    margin-top: 1rem;
    padding: 0.85rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-on-primary-container, #000000);
    background: var(--color-primary-container, #00f0ff);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.decode-form-submit-btn:hover {
    filter: brightness(1.15);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--color-primary-container, rgba(0, 240, 255, 0.4));
}

.decode-form-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.decode-form-alert {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-top: 1.25rem;
    font-size: 0.9rem;
    line-height: 1.4;
    display: none;
}

.decode-form-alert-success {
    display: block;
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.4);
    color: #4ade80;
}

.decode-form-alert-error {
    display: block;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #f87171;
}

/* === 5-SECOND COUNTDOWN OVERLAY === */
.decode-countdown-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(10px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    animation: decodeFadeIn 0.3s ease;
}

.decode-countdown-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 40px 30px;
    max-width: 440px;
    width: 100%;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    border: 1px solid #e2e8f0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1e293b;
    position: relative;
    overflow: hidden;
}

.decode-countdown-number-badge {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px auto;
    background: linear-gradient(135deg, #4f46e5, #00f0ff);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 38px;
    font-weight: 900;
    box-shadow: 0 10px 25px rgba(79, 70, 229, 0.35);
    animation: decodePulse 1s infinite alternate;
}

.decode-countdown-title {
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.decode-countdown-sub {
    font-size: 14px;
    color: #64748b;
    margin: 0;
}

@keyframes decodePulse {
    from { transform: scale(1); }
    to { transform: scale(1.08); }
}

@keyframes decodeFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
