@tailwind base;
@tailwind components;
@tailwind utilities;

/*!
 * YDP Theme – main stylesheet.
 * Tailwind handles bulk styling (loaded via CDN runtime). This file holds
 * supplementary utilities, line-clamp helpers and a couple of polished
 * patterns that benefit from native CSS.
 */

/* ---------- Line clamp helpers ---------- */
.line-clamp-1 { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- Container helper (matches Tailwind) ---------- */
.ydp-wrap { width: 100%; max-width: 1200px; margin-left: auto; margin-right: auto; padding-left: 1.25rem; padding-right: 1.25rem; }
@media (min-width: 768px)  { .ydp-wrap { padding-left: 2rem; padding-right: 2rem; } }

/* ---------- Polished gradient backgrounds ---------- */
.ydp-bg-grid {
    background-image:
        linear-gradient(rgba(11,18,32,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(11,18,32,0.04) 1px, transparent 1px);
    background-size: 40px 40px;
}
.ydp-bg-radial {
    background-image: radial-gradient(circle at 20% 0%, rgba(0,102,255,0.10), transparent 50%),
                      radial-gradient(circle at 100% 100%, rgba(0,102,255,0.08), transparent 50%);
}
.ydp-hero-mesh {
    background:
        radial-gradient(45rem 30rem at 10% -10%, rgba(0,102,255,0.18), transparent 60%),
        radial-gradient(40rem 28rem at 110% 20%, rgba(0,82,204,0.20), transparent 60%),
        linear-gradient(180deg, #ffffff 0%, #F6F8FB 100%);
}

/* ---------- Glass card ---------- */
.ydp-glass {
    background: rgba(255,255,255,0.7);
    backdrop-filter: saturate(140%) blur(10px);
    -webkit-backdrop-filter: saturate(140%) blur(10px);
    border: 1px solid rgba(230,234,242,0.7);
}

/* ---------- Animated underline ---------- */
.ydp-underline {
    background-image: linear-gradient(90deg, #0066FF 0%, #0066FF 100%);
    background-size: 100% 3px;
    background-position: 0 100%;
    background-repeat: no-repeat;
    padding-bottom: 2px;
}

/* ---------- Custom scrollbar ---------- */
.ydp-scroll::-webkit-scrollbar { height: 8px; width: 8px; }
.ydp-scroll::-webkit-scrollbar-track { background: #F6F8FB; }
.ydp-scroll::-webkit-scrollbar-thumb { background: #C9D3E6; border-radius: 99px; }
.ydp-scroll::-webkit-scrollbar-thumb:hover { background: #0066FF; }

/* ---------- Form base ---------- */
.ydp-input,
.ydp-select,
.ydp-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    border: 1px solid #E6EAF2;
    background: #fff;
    font-size: 0.9rem;
    color: #0B1220;
    transition: all .2s ease;
}
.ydp-input::placeholder, .ydp-textarea::placeholder { color: #94A0B8; }
.ydp-input:focus,
.ydp-select:focus,
.ydp-textarea:focus {
    outline: none;
    border-color: #0066FF;
    box-shadow: 0 0 0 4px rgba(0,102,255,0.12);
}
.ydp-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #0B1220;
    margin-bottom: 0.4rem;
}
.ydp-help { font-size: 0.75rem; color: #5B6478; margin-top: 0.25rem; }

/* ---------- Toggle / checkbox tile ---------- */
.ydp-tile {
    border: 1px solid #E6EAF2;
    border-radius: 0.85rem;
    padding: 1rem;
    cursor: pointer;
    transition: all .2s ease;
    background: #fff;
}
.ydp-tile:hover { border-color: #0066FF; }
.ydp-tile input { position: absolute; opacity: 0; pointer-events: none; }
.ydp-tile.is-active,
.ydp-tile:has(input:checked) {
    border-color: #0066FF;
    box-shadow: 0 0 0 4px rgba(0,102,255,0.12);
    background: #EBF2FF;
}

/* ---------- Marquee fade edges ---------- */
.ydp-marquee {
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

/* ---------- Print friendliness ---------- */
@media print {
    nav, footer, .ydp-no-print { display: none !important; }
}

/* ---------- Tailwind-CDN safety: lock body width ---------- */
body { overflow-x: hidden; }

/* ---------- Step progress ---------- */
.ydp-step { position: relative; flex: 1; }
.ydp-step:not(:last-child)::after {
    content: ''; position: absolute; top: 1rem; left: 50%; right: -50%; height: 2px; background: #E6EAF2;
}
.ydp-step.is-done:not(:last-child)::after,
.ydp-step.is-active:not(:last-child)::after { background: #0066FF; }
.ydp-step .ydp-step-num {
    width: 2rem; height: 2rem; display: inline-flex; align-items: center; justify-content: center;
    border-radius: 9999px; background: #fff; border: 2px solid #E6EAF2; color: #5B6478; font-weight: 700; position: relative; z-index: 1;
}
.ydp-step.is-active .ydp-step-num { background: #0066FF; border-color: #0066FF; color: #fff; box-shadow: 0 0 0 6px rgba(0,102,255,0.12); }
.ydp-step.is-done .ydp-step-num { background: #0066FF; border-color: #0066FF; color: #fff; }

/* ---------- Toast ---------- */
.ydp-toast {
    position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 90;
    background: #0B1220; color: #fff; padding: .9rem 1.1rem; border-radius: .85rem;
    box-shadow: 0 12px 30px -10px rgba(0,0,0,.35); display: flex; align-items: center; gap: .6rem;
    transform: translateY(120%); opacity: 0; transition: all .35s ease;
}
.ydp-toast.is-show { transform: translateY(0); opacity: 1; }
