/*
 * Converter hero (resources/views/livewire/components/search-form.blade.php).
 *
 * Plain CSS on purpose: the site ships a prebuilt Tailwind bundle, so utility classes that were
 * never compiled into it would not exist. Everything is scoped under .ych.
 */

.ych {
    --ych-teal: #2d8bad;
    --ych-teal-strong: #1f7898;
    --ych-teal-light: #6ccbe8;
    --ych-card: #ffffff;
    --ych-card-fg: #0f172a;
    --ych-muted: #64748b;
    --ych-line: #e3e8ee;
    --ych-soft: #f4f7f9;
    --ych-ease: cubic-bezier(0.22, 0.61, 0.36, 1);

    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: 44px 16px 36px;
    color: #ffffff;
    text-align: center;
    background:
        radial-gradient(900px 420px at 50% -140px, rgba(255, 255, 255, 0.24), transparent 70%),
        linear-gradient(135deg, #38a9cd 0%, #2d8bad 50%, #1d6c8b 100%);
}

[data-theme="dark"] .ych {
    --ych-card: #0f151c;
    --ych-card-fg: #e8edf3;
    --ych-muted: #8f9bab;
    --ych-line: #2a3542;
    --ych-soft: #18212b;

    background:
        radial-gradient(900px 420px at 50% -140px, rgba(45, 139, 173, 0.35), transparent 70%),
        linear-gradient(135deg, #1f2934 0%, #19222c 50%, #131a21 100%);
}

/* Faint grid, fading out towards the edges. */
.ych::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
    background-size: 36px 36px;
    -webkit-mask-image: radial-gradient(ellipse 70% 65% at 50% 35%, #000 25%, transparent 75%);
    mask-image: radial-gradient(ellipse 70% 65% at 50% 35%, #000 25%, transparent 75%);
}

[data-theme="dark"] .ych::before {
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
}

.ych-inner {
    max-width: 860px;
    margin: 0 auto;
}

.ych-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.ych svg {
    display: block;
    flex: none;
}

/* ---------- Heading ---------- */

.ych-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 14px;
    padding: 6px 12px 6px 10px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.01em;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.ych-eyebrow svg {
    width: 15px;
    height: 15px;
    color: #ffe08a;
}

[data-theme="dark"] .ych-eyebrow {
    border-color: rgba(108, 203, 232, 0.25);
    background: rgba(108, 203, 232, 0.1);
    color: #d7eef6;
}

.ych-title {
    margin: 0;
    color: #ffffff;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.12;
    text-shadow: 0 2px 18px rgba(0, 40, 60, 0.25);
}

.ych-lead {
    max-width: 560px;
    margin: 12px auto 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 16px;
    line-height: 1.55;
}

[data-theme="dark"] .ych-lead {
    color: #b9c3ce;
}

/* ---------- Search bar ---------- */

.ych-form {
    margin-top: 26px;
}

.ych-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border: 1px solid transparent;
    border-radius: 20px;
    background: var(--ych-card);
    color: var(--ych-card-fg);
    box-shadow: 0 24px 50px -24px rgba(5, 40, 58, 0.65), 0 2px 6px rgba(5, 40, 58, 0.08);
    transition: box-shadow 0.25s ease, border-color 0.25s ease, transform 0.25s var(--ych-ease);
}

.ych-bar:hover {
    box-shadow: 0 28px 60px -24px rgba(5, 40, 58, 0.75), 0 2px 6px rgba(5, 40, 58, 0.1);
}

.ych-bar:focus-within {
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.38), 0 28px 60px -24px rgba(5, 40, 58, 0.75);
}

[data-theme="dark"] .ych-bar {
    border-color: var(--ych-line);
    box-shadow: 0 24px 50px -24px rgba(0, 0, 0, 0.85);
}

[data-theme="dark"] .ych-bar:focus-within {
    border-color: rgba(108, 203, 232, 0.6);
    box-shadow: 0 0 0 4px rgba(108, 203, 232, 0.18), 0 28px 60px -24px rgba(0, 0, 0, 0.9);
}

.ych-bar__icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 40px;
    height: 40px;
    margin-left: 4px;
    border-radius: 12px;
    background: var(--ych-soft);
    color: var(--ych-teal-strong);
    transition: background-color 0.2s ease, color 0.2s ease;
}

.ych-bar__icon svg {
    width: 20px;
    height: 20px;
}

.ych-bar:focus-within .ych-bar__icon {
    background: var(--ych-teal-strong);
    color: #ffffff;
}

[data-theme="dark"] .ych-bar__icon {
    color: var(--ych-teal-light);
}

[data-theme="dark"] .ych-bar:focus-within .ych-bar__icon {
    background: var(--ych-teal-light);
    color: #0b1a22;
}

.ych-input {
    flex: 1 1 0;
    min-width: 0;
    height: 52px;
    padding: 0 4px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ych-card-fg);
    font: inherit;
    font-size: 17px;
    text-align: left;
}

.ych-input::placeholder {
    color: var(--ych-muted);
    opacity: 1;
}

.ych-tools {
    display: flex;
    align-items: center;
    flex: none;
}

.ych-paste {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--ych-line);
    border-radius: 12px;
    background: var(--ych-soft);
    color: var(--ych-card-fg);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.ych-paste svg {
    width: 17px;
    height: 17px;
    color: var(--ych-muted);
    transition: color 0.15s ease;
}

.ych-paste:hover {
    border-color: var(--ych-teal);
    color: var(--ych-teal-strong);
}

.ych-paste:hover svg {
    color: var(--ych-teal-strong);
}

[data-theme="dark"] .ych-paste:hover,
[data-theme="dark"] .ych-paste:hover svg {
    border-color: var(--ych-teal-light);
    color: var(--ych-teal-light);
}

.ych-clear {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--ych-muted);
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.ych-clear svg {
    width: 18px;
    height: 18px;
}

.ych-clear:hover {
    background: var(--ych-soft);
    color: var(--ych-card-fg);
}

.ych-submit {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1 0 100%;
    height: 52px;
    padding: 0 26px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, #2f9fc4 0%, #1f7898 100%);
    color: #ffffff;
    font: inherit;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 10px 22px -10px rgba(31, 120, 152, 0.9);
    transition: transform 0.2s var(--ych-ease), box-shadow 0.2s ease, filter 0.2s ease;
}

.ych-submit svg {
    width: 20px;
    height: 20px;
}

.ych-submit:hover {
    filter: brightness(1.07);
    transform: translateY(-1px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 14px 28px -10px rgba(31, 120, 152, 1);
}

.ych-submit:active {
    transform: translateY(0) scale(0.985);
}

.ych-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top-color: #ffffff;
    border-radius: 999px;
    animation: ych-spin 0.7s linear infinite;
}

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

.ych a:focus-visible,
.ych button:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

.ych-bar button:focus-visible {
    outline-color: var(--ych-teal-strong);
}

[data-theme="dark"] .ych-bar button:focus-visible {
    outline-color: var(--ych-teal-light);
}

/* ---------- Feature chips + terms ---------- */

.ych-features {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 10px;
    margin: 20px 0 0;
    padding: 0;
    list-style: none;
}

.ych-features li {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 13px 7px 10px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.2;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s var(--ych-ease);
}

.ych-features li:hover {
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.ych-features svg {
    width: 16px;
    height: 16px;
    color: #d9f3fb;
}

[data-theme="dark"] .ych-features li {
    border-color: rgba(255, 255, 255, 0.09);
    background: rgba(255, 255, 255, 0.04);
    color: #d6dde5;
}

[data-theme="dark"] .ych-features li:hover {
    border-color: rgba(108, 203, 232, 0.35);
    background: rgba(108, 203, 232, 0.08);
}

[data-theme="dark"] .ych-features svg {
    color: var(--ych-teal-light);
}

.ych-terms {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin: 18px 0 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 13.5px;
    line-height: 1.45;
}

.ych-terms svg {
    width: 16px;
    height: 16px;
    color: rgba(255, 255, 255, 0.82);
}

.ych-terms a {
    color: #ffffff;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.45);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: text-decoration-color 0.2s ease;
}

.ych-terms a:hover {
    text-decoration-color: #ffffff;
    text-decoration-thickness: 2px;
}

[data-theme="dark"] .ych-terms,
[data-theme="dark"] .ych-terms svg {
    color: #9eaab7;
}

[data-theme="dark"] .ych-terms a {
    color: #e8edf3;
    text-decoration-color: rgba(108, 203, 232, 0.5);
}

[data-theme="dark"] .ych-terms a:hover {
    text-decoration-color: var(--ych-teal-light);
}

/* ---------- Playlist verification (Turnstile) ---------- */

.ych-turnstile {
    display: flex;
    justify-content: center;
    margin-top: 16px;
}

.ych-turnstile:empty {
    margin-top: 0;
}

.ych-error {
    margin: 10px 0 0;
    color: #ffe1e1;
    font-size: 14px;
    font-weight: 600;
}

[data-theme="dark"] .ych-error {
    color: #f87171;
}

/* ---------- Breakpoints ---------- */

@media (max-width: 639px) {
    .ych-bar__icon,
    .ych-paste span {
        display: none;
    }

    .ych-input {
        padding-left: 10px;
        font-size: 16px;
    }

    .ych-paste {
        justify-content: center;
        width: 44px;
        height: 44px;
        padding: 0;
    }

    .ych-features {
        gap: 8px;
        margin-top: 18px;
    }

    .ych-features li {
        padding: 6px 11px 6px 9px;
        font-size: 13px;
    }

    .ych-terms {
        display: block;
        max-width: 320px;
        margin-left: auto;
        margin-right: auto;
    }

    .ych-terms svg {
        display: inline-block;
        margin-right: 4px;
        vertical-align: -3px;
    }
}

@media (min-width: 640px) {
    .ych {
        padding: 64px 24px 52px;
    }

    .ych-title {
        font-size: 44px;
    }

    .ych-lead {
        font-size: 17.5px;
    }

    .ych-bar {
        flex-wrap: nowrap;
        padding: 9px 9px 9px 10px;
    }

    .ych-input {
        height: 60px;
        font-size: 18px;
    }

    .ych-submit {
        flex: none;
        height: 56px;
    }
}

@media (min-width: 1024px) {
    .ych {
        padding: 80px 24px 64px;
    }

    .ych-title {
        font-size: 52px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ych *,
    .ych *::before,
    .ych *::after {
        transition-duration: 0s !important;
    }

    .ych-spinner {
        animation-duration: 1.6s;
    }
}
