/* tools.css — shared styles for the /tools/ ecosystem.
   Only declares rules that aren't worth re-implementing per page or that
   Tailwind utilities can't express cleanly. Page-specific styling stays
   in each tool's own <style> block. */

/* --- dropzone ------------------------------------------------------ */
.rs-dropzone {
    border: 2px dashed rgba(228, 228, 231, .18);
    border-radius: 20px;
    background: rgba(24, 24, 27, .35);
    padding: 48px 24px;
    text-align: center;
    transition: border-color .15s, background .15s, transform .15s;
    cursor: pointer;
}
.rs-dropzone:hover,
.rs-dropzone.is-hover {
    border-color: rgba(225, 29, 72, .65);
    background: rgba(225, 29, 72, .06);
}
.rs-dropzone.is-drag {
    border-color: #e11d48;
    background: rgba(225, 29, 72, .12);
    transform: scale(1.01);
}
.rs-dropzone-icon {
    font-size: 38px;
    color: #e11d48;
    margin-bottom: 14px;
}
.rs-dropzone-hint {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #71717a;
    text-transform: uppercase;
    letter-spacing: .12em;
    margin-top: 10px;
}

/* --- file/result panel chrome -------------------------------------- */
.rs-tool-panel {
    background: rgba(24, 24, 27, .6);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(63, 63, 70, .5);
    border-radius: 18px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, .5);
}

.rs-file-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border-top: 1px solid rgba(255, 255, 255, .04);
}
.rs-file-row:first-child { border-top: 0; }
.rs-file-row .rs-file-thumb {
    width: 48px; height: 48px; flex-shrink: 0;
    border-radius: 8px; background: #18181b;
    object-fit: cover; display: block;
}
.rs-file-row .rs-file-meta {
    flex: 1; min-width: 0;
}
.rs-file-row .rs-file-name {
    color: #f4f4f5; font-size: 14px; font-weight: 600;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rs-file-row .rs-file-sub {
    color: #a1a1aa; font-size: 12px; font-family: 'JetBrains Mono', monospace;
}
.rs-file-row .rs-file-saved {
    color: #34d399; font-size: 12px; font-weight: 600;
    font-family: 'JetBrains Mono', monospace; white-space: nowrap;
}

/* --- buttons ------------------------------------------------------- */
.rs-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font-family: 'Press Start 2P', cursive;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: 14px 22px;
    border-radius: 10px;
    border: none;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s, transform .1s, opacity .15s;
}
.rs-btn-primary { background: #dc2626; color: #fff; }
.rs-btn-primary:hover { background: #b91c1c; }
.rs-btn-primary:active { transform: scale(.98); }
.rs-btn-ghost {
    background: transparent; color: #f4f4f5;
    border: 1px solid rgba(255, 255, 255, .18);
}
.rs-btn-ghost:hover { background: rgba(255, 255, 255, .06); }
.rs-btn:disabled { opacity: .45; cursor: not-allowed; }

/* --- field controls ----------------------------------------------- */
.rs-select,
.rs-input {
    background: #18181b;
    border: 1px solid rgba(63, 63, 70, .8);
    color: #f4f4f5;
    padding: 10px 14px;
    border-radius: 8px;
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    outline: none;
}
.rs-select:focus,
.rs-input:focus { border-color: #e11d48; }

.rs-range {
    -webkit-appearance: none; appearance: none;
    width: 100%; height: 4px; background: #27272a; border-radius: 2px;
    outline: none;
}
.rs-range::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none;
    width: 18px; height: 18px; background: #e11d48; border-radius: 50%;
    cursor: pointer; border: 2px solid #0a0a0a;
}
.rs-range::-moz-range-thumb {
    width: 18px; height: 18px; background: #e11d48; border-radius: 50%;
    cursor: pointer; border: 2px solid #0a0a0a;
}

/* --- YouTube CTA --------------------------------------------------- */
/* Two variants. `banner` slots inline above/below the result area.
   `success` is a full card that replaces or follows the download button. */
.rs-yt-banner {
    display: flex; flex-wrap: wrap; align-items: center; gap: 16px;
    padding: 16px 20px;
    border-radius: 14px;
    background: linear-gradient(90deg, rgba(220,38,38,.16), rgba(220,38,38,.04));
    border: 1px solid rgba(220, 38, 38, .35);
    margin: 20px 0;
}
.rs-yt-banner .rs-yt-icon {
    width: 40px; height: 40px; flex-shrink: 0;
    border-radius: 10px; background: #dc2626;
    display: grid; place-items: center; color: #fff; font-size: 20px;
}
.rs-yt-banner .rs-yt-text { flex: 1; min-width: 220px; color: #f4f4f5; font-size: 14px; line-height: 1.5; }
.rs-yt-banner .rs-yt-text strong { color: #fff; font-weight: 700; }
.rs-yt-banner a.rs-btn { flex-shrink: 0; }

.rs-yt-success {
    margin-top: 28px;
    padding: 28px;
    border-radius: 18px;
    background: radial-gradient(circle at top right, rgba(220,38,38,.22), rgba(0,0,0,0) 60%), #0d0d0d;
    border: 1px solid rgba(220, 38, 38, .35);
    text-align: center;
}
.rs-yt-success h3 {
    font-family: 'Press Start 2P', cursive;
    font-size: 13px;
    color: #fff;
    margin: 0 0 10px;
    letter-spacing: .04em;
}
.rs-yt-success p { color: #a1a1aa; font-size: 13px; margin: 0 0 18px; line-height: 1.55; }

/* --- processing state --------------------------------------------- */
.rs-processing {
    display: flex; align-items: center; justify-content: center; gap: 12px;
    padding: 30px;
    color: #a1a1aa;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    letter-spacing: .06em;
}
.rs-spinner {
    width: 18px; height: 18px;
    border: 2px solid rgba(255,255,255,.12);
    border-top-color: #e11d48;
    border-radius: 50%;
    animation: rs-spin .8s linear infinite;
}
@keyframes rs-spin { to { transform: rotate(360deg); } }

/* --- tools hub grid ----------------------------------------------- */
.rs-tool-card {
    display: flex; flex-direction: column;
    padding: 24px;
    background: rgba(24, 24, 27, .6);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(63, 63, 70, .5);
    border-radius: 18px;
    text-decoration: none;
    color: inherit;
    transition: transform .15s, border-color .15s, background .15s;
    height: 100%;
}
.rs-tool-card:hover {
    transform: translateY(-3px);
    border-color: rgba(225, 29, 72, .55);
    background: rgba(24, 24, 27, .82);
}
.rs-tool-card .rs-tool-icon {
    width: 48px; height: 48px; border-radius: 12px;
    background: rgba(225, 29, 72, .12); color: #e11d48;
    display: grid; place-items: center; font-size: 22px;
    margin-bottom: 18px;
}
.rs-tool-card h3 {
    font-family: 'Press Start 2P', cursive;
    font-size: 12px; color: #fff; margin: 0 0 10px;
    letter-spacing: .04em; line-height: 1.5;
}
.rs-tool-card p { color: #a1a1aa; font-size: 13px; line-height: 1.6; margin: 0 0 14px; }
.rs-tool-card .rs-tool-tags {
    margin-top: auto;
    display: flex; flex-wrap: wrap; gap: 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px; color: #71717a; text-transform: uppercase; letter-spacing: .08em;
}
.rs-tool-card .rs-tool-tags span {
    padding: 3px 8px; border-radius: 4px; background: rgba(255,255,255,.04);
}

/* --- responsive tweaks -------------------------------------------- */
@media (max-width: 640px) {
    .rs-dropzone { padding: 36px 16px; }
    .rs-yt-banner { padding: 14px; }
    .rs-yt-banner .rs-yt-text { font-size: 13px; }
}
