/*
 * Folloy — overrides applied ONLY on pages that host the multi-step plugin
 * shortcode flow. Loaded conditionally by inc/enqueue.php when
 * folloy_page_has_flow_shortcode() === true.
 *
 * The plugin emits its own inline CSS (scoped to .ttv-* / .smm-* / .folloy-*
 * class prefixes). This file restyles those to match the Folloy gradient
 * brand without editing the plugin's PHP.
 */

body.is-flow-page {
    background:
        radial-gradient(60% 80% at 20% 20%, rgba(124, 58, 237, 0.12) 0%, transparent 60%),
        radial-gradient(50% 70% at 80% 30%, rgba(217, 70, 239, 0.10) 0%, transparent 60%),
        var(--wp--preset--color--ink-950);
}

/* Step indicator, progress bars, form cards from the legacy plugin. */
body.is-flow-page .ttv-card,
body.is-flow-page .ttv-step-card,
body.is-flow-page .smm-card,
body.is-flow-page .folloy-step-card {
    background: rgba(17, 17, 27, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    border-radius: 20px;
    padding: clamp(1.5rem, 4vw, 2.5rem);
    box-shadow:
        0 24px 48px -12px rgba(10, 10, 18, 0.45),
        0 0 0 1px rgba(217, 70, 239, 0.10);
}

@supports not (backdrop-filter: blur(1px)) {
    body.is-flow-page .ttv-card,
    body.is-flow-page .ttv-step-card,
    body.is-flow-page .smm-card,
    body.is-flow-page .folloy-step-card {
        background: rgba(20, 20, 30, 0.92);
    }
}

body.is-flow-page input[type="text"],
body.is-flow-page input[type="url"],
body.is-flow-page input[type="number"],
body.is-flow-page input[type="email"],
body.is-flow-page textarea,
body.is-flow-page select {
    background: rgba(10, 10, 18, 0.5) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: var(--wp--preset--color--ink-100) !important;
    border-radius: 12px !important;
    padding: 0.875rem 1rem !important;
    font-family: var(--wp--preset--font-family--body);
    font-size: 1rem;
    transition: border-color var(--folloy-duration-fast) var(--folloy-ease-out);
}

body.is-flow-page input:focus,
body.is-flow-page textarea:focus,
body.is-flow-page select:focus {
    border-color: var(--wp--preset--color--fuchsia-400) !important;
    outline: none !important;
}

body.is-flow-page button,
body.is-flow-page .button,
body.is-flow-page input[type="submit"],
body.is-flow-page .ttv-submit,
body.is-flow-page .smm-submit {
    background: var(--wp--preset--gradient--primary) !important;
    color: #FFFFFF !important;
    border: 0 !important;
    border-radius: 999px !important;
    padding: 0.875rem 1.75rem !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: transform var(--folloy-duration-fast) var(--folloy-ease-out),
                box-shadow var(--folloy-duration-base) var(--folloy-ease-out);
    box-shadow: 0 0 0 1px rgba(124, 58, 237, 0.25),
                0 16px 40px -12px rgba(124, 58, 237, 0.55);
}

body.is-flow-page button:hover,
body.is-flow-page .button:hover,
body.is-flow-page input[type="submit"]:hover {
    box-shadow: 0 0 0 1px rgba(217, 70, 239, 0.30),
                0 16px 40px -12px rgba(217, 70, 239, 0.55);
    transform: translate3d(0, -1px, 0);
}

body.is-flow-page button:disabled,
body.is-flow-page input[type="submit"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Step progress dots */
body.is-flow-page .ttv-steps,
body.is-flow-page .folloy-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

body.is-flow-page .ttv-step,
body.is-flow-page .folloy-step {
    width: 32px;
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.10);
    transition: background var(--folloy-duration-base) var(--folloy-ease-out);
}

body.is-flow-page .ttv-step.is-active,
body.is-flow-page .ttv-step.active,
body.is-flow-page .folloy-step.is-active {
    background: var(--wp--preset--gradient--primary);
}

/* Wait-timer countdown — neutral, processing-themed copy. Never says "ad" */
.folloy-countdown,
.ttv-countdown {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-variant-numeric: tabular-nums;
    color: var(--wp--preset--color--ink-200);
    font-weight: 500;
}

.folloy-countdown__ring,
.ttv-countdown__ring {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-top-color: var(--wp--preset--color--fuchsia-400);
    border-radius: 50%;
    animation: folloy-spin 0.9s linear infinite;
}

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

/* Plugin's success state */
body.is-flow-page .ttv-success,
body.is-flow-page .folloy-success {
    border-radius: 20px;
    padding: 2rem;
    background: linear-gradient(135deg,
        rgba(16, 185, 129, 0.10),
        rgba(124, 58, 237, 0.06));
    border: 1px solid rgba(16, 185, 129, 0.25);
    text-align: center;
}

body.is-flow-page .ttv-error,
body.is-flow-page .folloy-error {
    border-radius: 12px;
    padding: 1rem 1.25rem;
    background: rgba(239, 68, 68, 0.10);
    border: 1px solid rgba(239, 68, 68, 0.30);
    color: var(--wp--preset--color--ink-100);
}
