/* =====================================================
   tools.css — Shared styles for the Tools section
   assets/css/tools.css
   ===================================================== */

/* ── Subnav ──────────────────────────────────────── */
.tools-subnav-wrap {
    background: var(--bg-1, #111);
    border-bottom: 1px solid var(--border-2, #222);
    padding: 0 16px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.tools-subnav {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 8px 0;
    max-width: 1100px;
    margin: 0 auto;
}

.tools-subnav::-webkit-scrollbar { display: none; }

.tools-subnav a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-2, #ccc);
    font-size: .88rem;
    font-weight: 500;
    white-space: nowrap;
    transition: background .15s, color .15s;
}

.tools-subnav a:hover {
    background: rgba(0, 255, 213, .07);
    color: var(--brand, #00ffd5);
}

.tools-subnav a.active {
    background: rgba(0, 255, 213, .12);
    color: var(--brand, #00ffd5);
    font-weight: 700;
}

/* ── Page wrap ───────────────────────────────────── */
.tools-wrap {
    max-width: 960px;
    margin: 0 auto;
    padding: 24px 20px 60px;
}

/* ── Tool Hero card ──────────────────────────────── */
.tools-hero {
    background: linear-gradient(135deg, #0b2830 0%, #0a1a1f 100%);
    border: 1px solid rgba(0, 255, 213, .15);
    border-radius: 16px;
    padding: 28px 24px;
    margin-bottom: 24px;
}

.tools-hero h1 {
    font-size: 1.55rem;
    margin: 0 0 6px;
    color: #8ef6ff;
}

.tools-hero p {
    color: #9aa3af;
    margin: 0;
    font-size: .95rem;
}

.tools-badges {
    display: flex;
    gap: 8px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.tools-badge {
    background: rgba(0, 255, 213, .08);
    border: 1px solid rgba(0, 255, 213, .18);
    border-radius: 8px;
    padding: 4px 10px;
    font-size: .8rem;
    color: #8ef6ff;
    font-weight: 600;
}

/* ── Input card ──────────────────────────────────── */
.tools-input-card {
    background: var(--bg-2, #141414);
    border: 1px solid var(--border-2, #222);
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 20px;
}

.tools-input-row {
    display: flex;
    gap: 10px;
}

.tools-input-row input[type="url"],
.tools-input-row input[type="text"] {
    flex: 1;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--border-2, #222);
    background: var(--bg-1, #111);
    color: var(--text-1, #eee);
    font-size: 1rem;
    outline: none;
    transition: border-color .2s;
}

.tools-input-row input:focus {
    border-color: var(--brand, #00ffd5);
}

/* ── Primary action button ───────────────────────── */
.tools-btn {
    padding: 12px 22px;
    border-radius: 10px;
    border: none;
    background: #0b2830;
    color: #8ef6ff;
    font-weight: 700;
    font-size: .95rem;
    cursor: pointer;
    white-space: nowrap;
    transition: background .2s;
}

.tools-btn:hover  { background: #0e3540; }
.tools-btn:disabled { opacity: .5; cursor: not-allowed; }

/* Small variant */
.tools-btn-sm {
    padding: 6px 14px;
    border-radius: 8px;
    border: 1px solid var(--border-2, #222);
    background: var(--bg-1, #111);
    color: var(--text-1, #eee);
    font-size: .82rem;
    cursor: pointer;
    transition: border-color .2s;
}

.tools-btn-sm:hover { border-color: var(--brand, #00ffd5); }

/* ── Hint / usage line ───────────────────────────── */
.tools-hint  { color: var(--muted, #9aa3af); font-size: .82rem; margin-top: 8px; }
.tools-usage { color: var(--muted, #9aa3af); font-size: .85rem; margin-top: 6px; }

/* ── Status banner ───────────────────────────────── */
.tools-status {
    margin: 16px 0;
    padding: 14px 16px;
    border-radius: 10px;
    display: none;
    font-size: .92rem;
    line-height: 1.5;
}

.tools-status.show  { display: block; }
.tools-status.info  { background: rgba(0,168,255,.08); border: 1px solid rgba(0,168,255,.2); color: #7dd3fc; }
.tools-status.success { background: rgba(0,255,150,.06); border: 1px solid rgba(0,255,150,.18); color: #a7f3d0; }
.tools-status.error { background: rgba(255,80,80,.08); border: 1px solid rgba(255,80,80,.2); color: #fca5a5; }

/* ── Result box ──────────────────────────────────── */
.tools-result {
    background: var(--bg-2, #141414);
    border: 1px solid var(--border-2, #222);
    border-radius: 14px;
    padding: 20px;
    margin-top: 20px;
    display: none;
}

.tools-result.show { display: block; }

.tools-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.tools-result-meta { display: flex; gap: 10px; flex-wrap: wrap; }

.tools-meta-chip {
    background: rgba(0, 255, 213, .06);
    border: 1px solid rgba(0, 255, 213, .12);
    padding: 3px 10px;
    border-radius: 8px;
    font-size: .78rem;
    color: #8ef6ff;
}

.tools-result-actions { display: flex; gap: 8px; }

.tools-transcript-text {
    background: var(--bg-1, #111);
    border: 1px solid var(--border-2, #222);
    border-radius: 10px;
    padding: 16px;
    color: var(--text-1, #eee);
    font-size: .95rem;
    line-height: 1.7;
    max-height: 400px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* ── History list ────────────────────────────────── */
.tools-history { margin-top: 28px; }
.tools-history h3 { color: var(--brand, #00ffd5); margin-bottom: 12px; }

.tools-hist-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 10px;
    align-items: center;
    padding: 10px 14px;
    border-bottom: 1px dashed var(--border-2, #222);
    cursor: pointer;
    transition: background .15s;
    border-radius: 6px;
}

.tools-hist-row:hover { background: rgba(255,255,255,.03); }

.tools-hist-url  { font-size: .88rem; color: var(--text-1, #eee); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tools-hist-plat { font-size: .78rem; color: #8ef6ff; text-transform: uppercase; font-weight: 600; }
.tools-hist-time { font-size: .78rem; color: var(--muted, #9aa3af); white-space: nowrap; }

.tools-hist-status {
    font-size: .75rem;
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 600;
}

.tools-hist-status.done    { background: rgba(0,255,150,.1); color: #6ee7b7; }
.tools-hist-status.failed  { background: rgba(255,80,80,.1); color: #fca5a5; }
.tools-hist-status.pending,
.tools-hist-status.downloading,
.tools-hist-status.transcribing { background: rgba(0,168,255,.1); color: #7dd3fc; }

/* ── Admin settings panel ────────────────────────── */
.tools-admin-panel {
    background: var(--bg-2, #141414);
    border: 1px solid var(--border-2, #222);
    border-radius: 14px;
    padding: 20px;
    margin-top: 28px;
}

.tools-admin-panel h3 { color: #ff9f43; margin-bottom: 14px; }

.tools-admin-grid { display: grid; gap: 14px; }

.tools-admin-field label {
    display: block;
    font-size: .85rem;
    color: var(--text-3, #aaa);
    margin-bottom: 4px;
}

.tools-admin-field input[type="text"],
.tools-admin-field input[type="number"],
.tools-admin-field select {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-2, #222);
    background: var(--bg-1, #111);
    color: var(--text-1, #eee);
    font-size: .95rem;
    outline: none;
    transition: border-color .2s;
}

.tools-admin-field input:focus { border-color: var(--brand, #00ffd5); }

.tools-toggle-row { display: flex; align-items: center; gap: 10px; }
.tools-toggle-row label { margin: 0; font-size: .9rem; color: var(--text-1, #eee); }

/* ── Tools index card grid ───────────────────────── */
.tools-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 18px;
    margin-top: 20px;
}

.tools-card {
    background: var(--bg-2, #141414);
    border: 1px solid var(--border-2, #222);
    border-radius: 14px;
    padding: 20px;
    text-decoration: none;
    color: var(--text-1, #eee);
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: border-color .2s, transform .15s;
}

.tools-card:hover {
    border-color: rgba(0, 255, 213, .3);
    transform: translateY(-2px);
}

.tools-card-icon { font-size: 2rem; }
.tools-card-title { font-weight: 700; font-size: 1.05rem; color: #8ef6ff; }
.tools-card-desc  { font-size: .88rem; color: var(--muted, #9aa3af); line-height: 1.5; }

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 600px) {
    .tools-input-row { flex-direction: column; }
    .tools-hist-row  { grid-template-columns: 1fr auto; }
    .tools-hist-time { display: none; }
    .tools-wrap      { padding: 16px 14px 50px; }
}

/* ── Tool access trial bar ───────────────────────────────── */
.tool-trial-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: rgba(251,191,36,.08);
    border: 1px solid rgba(251,191,36,.22);
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: .88rem;
    color: #fbbf24;
}

.tool-trial-icon { font-size: 1.1rem; flex-shrink: 0; }

/* ── Tool access popup overlay ───────────────────────────── */
.tool-access-overlay {
    position: fixed;
    inset: 0;
    z-index: 500;
    background: rgba(0,0,0,.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.tool-access-modal {
    background: var(--bg-2, #141414);
    border: 1px solid rgba(0,255,213,.2);
    border-radius: 18px;
    width: 100%;
    max-width: 720px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 60px rgba(0,0,0,.6);
}

.tool-access-modal-inner {
    padding: 32px 28px;
    text-align: center;
}

.tool-access-icon { font-size: 2.4rem; margin-bottom: 12px; }

.tool-access-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: #8ef6ff;
    margin: 0 0 8px;
}

.tool-access-subtitle {
    color: var(--muted, #9aa3af);
    font-size: .92rem;
    margin: 0 0 22px;
}

/* ── Plan cards inside popup ─────────────────────────────── */
.tool-access-plans {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    text-align: left;
    margin-top: 6px;
}

.tool-access-plan-card {
    background: var(--bg-1, #111);
    border: 1px solid var(--border-2, #222);
    border-radius: 14px;
    padding: 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: border-color .15s;
}

.tool-access-plan-card:hover {
    border-color: rgba(0,255,213,.3);
}

.tool-access-plan-img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
}

.tool-access-plan-name {
    font-weight: 700;
    font-size: .95rem;
    color: #8ef6ff;
}

.tool-access-plan-price {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-0, #fff);
}

.tool-access-plan-period {
    font-size: .78rem;
    font-weight: 400;
    color: var(--muted, #9aa3af);
    margin-left: 2px;
}

.tool-access-plan-desc {
    font-size: .82rem;
    color: var(--muted, #9aa3af);
    line-height: 1.5;
}

.tool-access-features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 5px;
}

.tool-access-features li {
    font-size: .82rem;
    color: var(--text-2, #ccc);
    padding-left: 18px;
    position: relative;
    line-height: 1.4;
}

.tool-access-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #6ee7b7;
    font-weight: 700;
}

.tool-access-trial-note {
    font-size: .78rem;
    color: #fbbf24;
    background: rgba(251,191,36,.08);
    border: 1px solid rgba(251,191,36,.18);
    border-radius: 6px;
    padding: 4px 10px;
}

.tool-access-plan-btn {
    display: block;
    text-align: center;
    padding: 11px 14px;
    background: #0b2830;
    color: #8ef6ff;
    border: 1px solid rgba(0,255,213,.25);
    border-radius: 10px;
    font-weight: 700;
    font-size: .88rem;
    text-decoration: none;
    margin-top: auto;
    transition: background .15s, border-color .15s;
}

.tool-access-plan-btn:hover {
    background: #0e3540;
    border-color: rgba(0,255,213,.5);
}

/* ── Blur the tool content when denied ───────────────────── */
.tool-content-blurred {
    filter: blur(4px);
    pointer-events: none;
    user-select: none;
}

@media (max-width: 600px) {
    .tool-access-modal-inner { padding: 24px 16px; }
    .tool-access-plans { grid-template-columns: 1fr; }
}


/* ── Tool modals ──────────────────────────────────────────────────── */
.tool-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, .78);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
}
.tool-modal-box {
    background: var(--card-bg, #111827);
    border: 1px solid var(--border-2, #2a2a3a);
    border-radius: 18px;
    padding: 40px 32px;
    max-width: 440px;
    width: 100%;
    text-align: center;
    box-shadow: 0 24px 60px rgba(0,0,0,.5);
    animation: modalIn .22s ease;
}
@keyframes modalIn {
    from { opacity: 0; transform: scale(.94) translateY(12px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}
.tool-modal-icon   { font-size: 52px; margin-bottom: 14px; }
.tool-modal-title  { font-size: 1.35rem; font-weight: 700; margin: 0 0 12px; }
.tool-modal-desc   { font-size: .92rem; color: var(--muted, #9aa3af); margin-bottom: 24px; line-height: 1.6; }
.tool-modal-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.tool-modal-btn {
    padding: 10px 22px;
    border-radius: 8px;
    font-size: .9rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: opacity .15s;
}
.tool-modal-btn:hover       { opacity: .85; }
.tool-modal-btn.primary     { background: var(--brand, #00ffd5); color: #0e0e0e; }
.tool-modal-btn.secondary   { background: var(--bg-1, #1f2937); color: var(--muted, #9aa3af); border: 1px solid var(--border-2, #2a2a3a); }

/* ── Credit bar ─────────────────────────────────────────────────── */
.tool-credit-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: rgba(251,191,36,.07);
    border: 1px solid rgba(251,191,36,.2);
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: .88rem;
    color: #fbbf24;
}
.tool-credit-icon { font-size: 1.1rem; flex-shrink: 0; }



/* ── Tools Usage Page ───────────────────────────────────────── */

.tools-usage-wrap{
    max-width: 1100px;
}

.tools-usage-top{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 20px;
}

.tools-usage-stat-card{
    background: var(--bg-2, #141414);
    border: 1px solid var(--border-2, #222);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.tools-usage-balance-card{
    border-color: rgba(251,191,36,.22);
    box-shadow: 0 0 0 1px rgba(251,191,36,.06) inset;
}

.tools-usage-stat-icon{
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: rgba(0,255,213,.08);
    border: 1px solid rgba(0,255,213,.14);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8ef6ff;
    font-size: 20px;
    flex: 0 0 52px;
}

.tools-usage-stat-content{
    flex: 1;
    min-width: 0;
}

.tools-usage-stat-label{
    color: var(--muted, #9aa3af);
    font-size: .86rem;
    margin-bottom: 6px;
}

.tools-usage-stat-value{
    color: #fff;
    font-size: 1.9rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 6px;
    word-break: break-word;
}

.tools-plan-value{
    color: #8ef6ff;
    font-size: 1.45rem;
}

.tools-plan-none{
    color: #fca5a5;
    font-size: 1.35rem;
}

.tools-usage-stat-sub{
    color: var(--muted, #9aa3af);
    font-size: .9rem;
    line-height: 1.55;
}

.tools-usage-actions{
    margin-top: 14px;
}

.tools-usage-note-card{
    margin-bottom: 20px;
}

.tools-usage-section-title{
    margin: 0 0 14px;
    color: #8ef6ff;
    font-size: 1.02rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tools-usage-note-list{
    display: grid;
    gap: 10px;
}

.tools-usage-note-item{
    background: var(--bg-1, #111);
    border: 1px solid var(--border-2, #222);
    border-radius: 10px;
    padding: 12px 14px;
    color: var(--text-2, #ccc);
    line-height: 1.6;
    font-size: .92rem;
}

.tools-usage-table-head{
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.tools-usage-table-wrap{
    width: 100%;
    overflow-x: auto;
}

.tools-usage-table{
    width: 100%;
    border-collapse: collapse;
    min-width: 820px;
}

.tools-usage-table th,
.tools-usage-table td{
    padding: 12px 12px;
    border-bottom: 1px dashed var(--border-2, #222);
    text-align: left;
    vertical-align: top;
}

.tools-usage-table th{
    color: var(--muted, #9aa3af);
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    font-weight: 700;
}

.tools-usage-table td{
    color: var(--text-1, #eee);
    font-size: .92rem;
}

.tools-usage-type-chip{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 700;
    white-space: nowrap;
}

.tools-usage-type-chip.is-credit{
    background: rgba(34,197,94,.10);
    color: #86efac;
    border: 1px solid rgba(34,197,94,.20);
}

.tools-usage-type-chip.is-debit{
    background: rgba(239,68,68,.10);
    color: #fca5a5;
    border: 1px solid rgba(239,68,68,.20);
}

.tools-usage-amount{
    font-weight: 800;
    white-space: nowrap;
}

.tools-usage-amount.is-credit{
    color: #86efac;
}

.tools-usage-amount.is-debit{
    color: #fca5a5;
}

.tools-usage-note-cell{
    min-width: 260px;
    color: var(--muted, #9aa3af);
    line-height: 1.55;
}

.tools-usage-date-cell{
    white-space: nowrap;
    color: var(--muted, #9aa3af);
}

@media (max-width: 820px){
    .tools-usage-top{
        grid-template-columns: 1fr;
    }

    .tools-usage-stat-card{
        padding: 16px;
    }

    .tools-usage-stat-value{
        font-size: 1.55rem;
    }

    .tools-plan-value,
    .tools-plan-none{
        font-size: 1.2rem;
    }
}


.tools-subnav .disabled{
    opacity:.55;
    cursor:not-allowed;
}

.tools-card-status{
    display:inline-flex;
    align-items:center;
    width:max-content;
    padding:5px 10px;
    border-radius:999px;
    font-size:12px;
    font-weight:800;
}

.tools-card-status.is-active{
    color:#86efac;
    border:1px solid rgba(34,197,94,.22);
    background:rgba(34,197,94,.10);
}

.tools-card-status.is-inactive{
    color:#fca5a5;
    border:1px solid rgba(239,68,68,.22);
    background:rgba(239,68,68,.10);
}

.tools-card-meta{
    color:#94a3b8;
    font-size:12px;
    line-height:1.5;
}

.tools-card.is-disabled{
    opacity:.72;
    cursor:not-allowed;
}

.tools-empty-box{
    background:#0b1220;
    border:1px dashed #334155;
    border-radius:14px;
    padding:18px;
    color:#94a3b8;
}

@media (max-width: 768px){
    .tools-subnav a,
    .tools-subnav span{
        min-height:20px;
        padding:3px 5px;
        font-size:12px;
        gap:1px;
    }
}

.tx-input-zone {
    background:linear-gradient(135deg,#061e28 0%,#091520 100%);
    border:2px solid rgba(0,255,213,.28);border-radius:18px;
    padding:28px 24px 22px;margin-bottom:20px;
    box-shadow:0 0 0 4px rgba(0,255,213,.04);
}
.tx-input-zone-label { font-size:.9rem;font-weight:700;color:#8ef6ff;margin-bottom:12px;display:flex;align-items:center;gap:7px;text-transform:uppercase;letter-spacing:.05em; }
.tx-input-zone-row { display:flex;gap:10px; }
.tx-url-input { flex:1;padding:14px 16px;border-radius:12px;border:2px solid rgba(0,255,213,.18);background:rgba(0,0,0,.45);color:#fff;font-size:1rem;outline:none;transition:border-color .2s,box-shadow .2s;min-width:0; }
.tx-url-input::placeholder { color:rgba(255,255,255,.3); }
.tx-url-input:focus { border-color:var(--brand,#00ffd5);box-shadow:0 0 0 3px rgba(0,255,213,.12); }
.tx-submit-btn { padding:14px 26px;border-radius:12px;border:none;background:linear-gradient(135deg,#00c9a7 0%,#007cf0 100%);color:#fff;font-weight:800;font-size:1rem;cursor:pointer;white-space:nowrap;display:flex;align-items:center;gap:8px;transition:opacity .2s,transform .15s;flex-shrink:0; }
.tx-submit-btn:hover { opacity:.88;transform:translateY(-1px); }
.tx-submit-btn:active { transform:translateY(0); }
.tx-submit-btn:disabled { opacity:.45;cursor:not-allowed;transform:none; }
.tx-input-zone-hint { margin-top:10px;font-size:.8rem;color:rgba(255,255,255,.35); }
.tx-input-zone-hint kbd { background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.15);border-radius:4px;padding:1px 5px;font-size:.78rem; }
.tx-progress-wrap { background:var(--bg-2,#141414);border:1px solid var(--border-2,#222);border-radius:12px;padding:16px 18px;margin-bottom:16px; }
.tx-progress-header { display:flex;justify-content:space-between;align-items:center;font-size:.85rem;color:var(--text-2,#ccc);margin-bottom:8px; }
.tx-progress-pct { color:#8ef6ff;font-weight:700;font-size:.82rem; }
.tx-progress-track { background:var(--bg-1,#111);border-radius:999px;height:8px;overflow:hidden; }
.tx-progress-fill { height:100%;width:0%;background:linear-gradient(90deg,#00ffd5,#007cf0);border-radius:999px;transition:width .4s ease; }
.tx-progress-hint { margin-top:8px;font-size:.78rem;color:var(--muted,#9aa3af); }
.tx-error-box { background:rgba(255,80,80,.08);border:1px solid rgba(255,80,80,.25);border-radius:10px;padding:14px 16px;color:#fca5a5;font-size:.92rem;line-height:1.55;margin-bottom:16px; }
.tools-hist-row { cursor:pointer;grid-template-columns:1fr auto auto auto;gap:10px;user-select:none; }
.tx-hist-info { min-width:0;overflow:hidden; }
.tools-hist-url { font-size:.88rem;color:var(--text-1,#eee);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%; }
.tx-hist-chevron { color:var(--muted,#9aa3af);font-size:.8rem;transition:transform .2s;flex-shrink:0; }
.tools-hist-row.is-open .tx-hist-chevron { transform:rotate(180deg); }
.tools-hist-row.is-open { background:rgba(0,255,213,.04);border-bottom-color:transparent;border-radius:10px 10px 0 0; }
.tools-hist-viewer { background:var(--bg-1,#111);border:1px solid var(--border-2,#222);border-top:none;border-radius:0 0 10px 10px;padding:14px;margin-bottom:4px; }
.tx-viewer-toolbar { display:flex;justify-content:space-between;align-items:center;margin-bottom:10px;flex-wrap:wrap;gap:8px; }
.tx-viewer-loading { color:var(--muted,#9aa3af);font-size:.88rem;font-style:italic; }
@media(max-width:600px){
    .tx-input-zone{padding:20px 16px 18px;}
    .tx-input-zone-row{flex-direction:column;}
    .tx-submit-btn{width:100%;justify-content:center;padding:14px 20px;}
    .tx-btn-label::before{content:'Generate Transcript';}
    .tx-btn-label{font-size:0;}
    .tools-hist-url{font-size:.8rem;max-width:calc(100vw - 160px);}
    .tools-hist-time{display:none;}
    .tools-hist-row{grid-template-columns:1fr auto auto;}
}


/* ═══════════════════════════════════════════════════
   Audio Library  (tools/audiolibrary.php)
   ═══════════════════════════════════════════════════ */

.alib-filter-bar {
    background: var(--bg-2, #141414);
    border: 1px solid var(--border-2, #222);
    border-radius: 14px;
    padding: 16px 18px;
    margin-bottom: 18px;
}

.alib-filter-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.alib-filter-field label {
    display: block;
    font-size: .78rem;
    margin-bottom: 4px;
}

.alib-filter-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 12px;
}

/* Track list */
.alib-track-list { display: flex; flex-direction: column; gap: 6px; }

.alib-track {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--bg-2, #141414);
    border: 1px solid var(--border-2, #222);
    border-radius: 12px;
    padding: 12px 14px;
    transition: border-color .15s, background .15s;
}

.alib-track:hover {
    border-color: rgba(0,255,213,.22);
    background: rgba(0,255,213,.025);
}

/* Play button */
.alib-play-btn {
    flex-shrink: 0;
    width: 42px; height: 42px;
    border-radius: 50%;
    border: 2px solid rgba(0,255,213,.35);
    background: rgba(0,255,213,.08);
    color: #8ef6ff;
    font-size: 1rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background .15s, border-color .15s, transform .12s;
    line-height: 1;
}
.alib-play-btn:hover    { background: rgba(0,255,213,.18); transform: scale(1.07); }
.alib-play-btn.is-playing { background: rgba(0,255,213,.22); border-color: #00ffd5; }

/* Track info */
.alib-track-info { flex: 1; min-width: 0; }

.alib-track-name {
    font-size: .92rem;
    font-weight: 600;
    color: var(--text-1, #eee);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.alib-track-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: .75rem;
    color: var(--muted, #9aa3af);
    margin-bottom: 6px;
}

.alib-mood-tag {
    background: rgba(0,255,213,.08);
    border: 1px solid rgba(0,255,213,.18);
    color: #8ef6ff;
    border-radius: 6px;
    padding: 1px 7px;
    font-size: .72rem;
    font-weight: 600;
}

.alib-track-stat { opacity: .75; }

.alib-waveform {
    height: 3px;
    background: rgba(255,255,255,.08);
    border-radius: 999px;
    overflow: hidden;
}
.alib-waveform-fill {
    height: 100%; width: 0%;
    background: linear-gradient(90deg, #00ffd5, #007cf0);
    border-radius: 999px;
    transition: width .35s linear;
}

/* Track actions */
.alib-track-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
    align-items: center;
}

.alib-star-btn {
    background: none; border: none; cursor: pointer;
    font-size: 1.2rem; color: var(--muted, #9aa3af);
    line-height: 1; padding: 2px 4px;
    transition: color .15s, transform .12s;
}
.alib-star-btn:hover   { color: #fbbf24; transform: scale(1.15); }
.alib-star-btn.is-starred { color: #fbbf24; }

.alib-dl-btn {
    display: flex; align-items: center; justify-content: center;
    width: 30px; height: 30px;
    border-radius: 8px;
    border: 1px solid var(--border-2, #222);
    background: var(--bg-1, #111);
    color: #8ef6ff;
    font-size: .95rem;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}
.alib-dl-btn:hover    { border-color: rgba(0,255,213,.4); background: rgba(0,255,213,.07); }
.alib-dl-btn:disabled { opacity: .5; cursor: not-allowed; }

/* ── Mobile ──────────────────────────────────────────────── */
@media (max-width: 640px) {
    .alib-filter-grid { grid-template-columns: 1fr 1fr; }
    .alib-track { padding: 10px; gap: 10px; }
    .alib-play-btn { width: 38px; height: 38px; font-size: .9rem; }
    .alib-track-name { font-size: .85rem; }
    .alib-track-actions { flex-direction: row; gap: 8px; }
}

@media (max-width: 400px) {
    .alib-filter-grid { grid-template-columns: 1fr; }
}

/* ── Audio Library teaser banner (non-subscribers see tracks but not actions) ── */
.alib-teaser-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: rgba(251,191,36,.07);
    border: 1px solid rgba(251,191,36,.22);
    border-radius: 12px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}
.alib-teaser-icon { font-size: 1.3rem; flex-shrink: 0; }
.alib-teaser-text { flex: 1; min-width: 180px; font-size: .9rem; color: #e2c97e; line-height: 1.5; }
.alib-teaser-btn {
    padding: 8px 18px;
    border-radius: 8px;
    background: rgba(251,191,36,.15);
    border: 1px solid rgba(251,191,36,.35);
    color: #fbbf24;
    font-weight: 700;
    font-size: .88rem;
    text-decoration: none;
    white-space: nowrap;
    transition: background .15s;
}
.alib-teaser-btn:hover { background: rgba(251,191,36,.28); }

/* Locked track state */
.alib-track.is-locked { opacity: .72; }
.alib-track.is-locked .alib-play-btn { border-color: rgba(255,255,255,.15); background: rgba(255,255,255,.04); color: #666; }
.alib-track.is-locked .alib-dl-btn   { color: #666; border-color: rgba(255,255,255,.1); }

/* Audio Library teaser banner */
.alib-teaser-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: rgba(251,191,36,.07);
    border: 1px solid rgba(251,191,36,.22);
    border-radius: 12px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}
@media (max-width: 640px) {
    .alib-teaser-banner { flex-direction: column; align-items: flex-start; }
}



/* ═══════════════════════════════════════════════════
   Movie Maker  (tools/movie-maker.php)
   Append this block to assets/css/tools.css
   ═══════════════════════════════════════════════════ */

.mm-input-zone { padding-bottom: 22px; }

.mm-textarea {
    width: 100%;
    box-sizing: border-box;
    background: rgba(0,0,0,.4);
    border: 1px solid rgba(0,255,213,.2);
    border-radius: 12px;
    color: #e8eefc;
    font-size: .97rem;
    line-height: 1.65;
    padding: 13px 15px;
    resize: vertical;
    font-family: inherit;
    transition: border-color .2s, box-shadow .2s;
    display: block;
}
.mm-textarea:focus {
    outline: none;
    border-color: rgba(0,255,213,.45);
    box-shadow: 0 0 0 3px rgba(0,255,213,.08);
}
.mm-textarea::placeholder { color: rgba(255,255,255,.28); }

.mm-char-count {
    font-size: .8rem;
    color: var(--muted, #9aa3af);
    white-space: nowrap;
}

/* Result panel */
.mm-result-panel {
    background: var(--bg-2, #141414);
    border: 1px solid rgba(120,170,255,.18);
    border-radius: 14px;
    padding: 20px;
    margin-top: 22px;
    position: relative;
}
.mm-result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}
.mm-result-title { margin: 0; font-size: 1.15rem; color: #e8eefc; }
.mm-result-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.mm-close-btn { color: #fca5a5 !important; border-color: rgba(255,80,80,.3) !important; }
.mm-result-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }

/* Accordion item */
.mm-acc-item {
    border: 1px solid rgba(120,170,255,.15);
    border-radius: 12px;
    margin-bottom: 8px;
    overflow: visible;          /* never clip children */
    background: rgba(255,255,255,.02);
}
.mm-acc-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 16px;
    cursor: pointer;
    user-select: none;
    border-radius: 12px;       /* match parent when body is hidden */
}
.mm-acc-header:hover { background: rgba(255,255,255,.03); border-radius: 12px; }
.mm-acc-title { flex: 1; font-weight: 700; font-size: .95rem; color: #c5d8ff; }
.mm-acc-badge {
    font-size: .72rem;
    padding: 2px 9px;
    border-radius: 999px;
    background: rgba(0,255,213,.08);
    border: 1px solid rgba(0,255,213,.2);
    color: #8ef6ff;
    white-space: nowrap;
    flex-shrink: 0;
}
.mm-acc-chev { color: #9aa3af; font-size: .85rem; flex-shrink: 0; }

/* Accordion body — display toggled entirely by JS inline style */
.mm-acc-body {
    padding: 4px 16px 16px;
    border-top: 1px solid rgba(120,170,255,.1);
}

/* Section inside body */
.mm-section { margin-top: 14px; }
.mm-section-label {
    font-size: .73rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #8ef6ff;
    margin-bottom: 6px;
}
.mm-section-box-wrap { position: relative; }
.mm-section-box {
    display: block;
    background: rgba(0,0,0,.3);
    border: 1px solid rgba(120,170,255,.12);
    border-radius: 8px;
    padding: 12px 56px 12px 13px;  /* right pad for copy btn */
    font-size: .875rem;
    line-height: 1.65;
    color: #d5def1;
    white-space: pre-wrap;
    word-break: break-word;
    margin: 0;
    font-family: inherit;
    max-height: 420px;
    overflow-y: auto;
}
.mm-copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(120,170,255,.2);
    border-radius: 6px;
    color: #9aa3af;
    font-size: .72rem;
    padding: 3px 9px;
    cursor: pointer;
    transition: color .15s, background .15s;
    white-space: nowrap;
    line-height: 1.5;
}
.mm-copy-btn:hover { color: #8ef6ff; background: rgba(0,255,213,.08); }

/* History */
.mm-history { margin-top: 28px; }
.mm-history-title { color: var(--brand, #00ffd5); margin-bottom: 8px; font-size: 1rem; }
.mm-hist-row {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    gap: 10px;
    align-items: center;
    padding: 10px 14px;
    border-bottom: 1px dashed var(--border-2, #222);
    cursor: pointer;
    border-radius: 6px;
    transition: background .15s;
}
.mm-hist-row:hover { background: rgba(0,255,213,.04); }
.mm-hist-prompt {
    font-size: .88rem;
    color: var(--text-1, #eee);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.mm-hist-chev { color: var(--muted, #9aa3af); font-size: .8rem; }

@media (max-width: 600px) {
    .mm-result-header { flex-direction: column; align-items: flex-start; }
    .mm-acc-header { padding: 11px 13px; }
    .mm-acc-body { padding: 4px 12px 14px; }
    .mm-hist-row { grid-template-columns: 1fr auto auto; }
    .mm-hist-chev { display: none; }
}

/* ── Movie Maker: How-to video toggle ───────────────────── */
.mm-howto-wrap {
    margin-top: 18px;
    border-top: 1px solid rgba(0,255,213,.1);
    padding-top: 14px;
}

.mm-howto-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: 1px solid rgba(0,255,213,.22);
    border-radius: 999px;
    padding: 7px 16px;
    color: #8ef6ff;
    font-size: .85rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .18s, border-color .18s;
    letter-spacing: .02em;
}
.mm-howto-toggle:hover {
    background: rgba(0,255,213,.07);
    border-color: rgba(0,255,213,.45);
}
.mm-howto-toggle-icon {
    font-size: 1rem;
    flex-shrink: 0;
}
.mm-howto-toggle-chev {
    font-size: .72rem;
    color: #9aa3af;
    transition: transform .25s;
    flex-shrink: 0;
}
.mm-howto-toggle.is-open .mm-howto-toggle-chev {
    transform: rotate(180deg);
}

.mm-howto-video-wrap {
    margin-top: 14px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(0,255,213,.15);
    background: #000;
    position: relative;
    /* slide animation */
    max-height: 0;
    opacity: 0;
    transition: max-height .38s cubic-bezier(.4,0,.2,1), opacity .28s ease;
}
.mm-howto-video-wrap.is-open {
    max-height: 700px;   /* generous ceiling */
    opacity: 1;
}

.mm-howto-video-wrap iframe {
    display: block;
    width: 100%;
    border: none;
    aspect-ratio: 16 / 9;
}

.mm-howto-close-row {
    display: flex;
    justify-content: flex-end;
    padding: 8px 12px 10px;
    background: rgba(0,0,0,.35);
}
.mm-howto-close-btn {
    background: none;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 8px;
    color: #9aa3af;
    font-size: .78rem;
    padding: 4px 12px;
    cursor: pointer;
    transition: color .15s, border-color .15s;
    display: flex;
    align-items: center;
    gap: 5px;
}
.mm-howto-close-btn:hover {
    color: #fca5a5;
    border-color: rgba(255,80,80,.35);
}

/* ── Movie Maker: submit row (button + mobile upsell) ── */


/* ── Movie Maker: AVM upsell bar (replaces desktop/mobile split) ── */
.mm-upsell-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 18px;
    background: rgba(251,191,36,.07);
    border: 1px solid rgba(251,191,36,.25);
    border-radius: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.mm-upsell-bar-text {
    font-size: .9rem;
    color: #e2c97e;
    font-weight: 600;
}
.mm-avm-upsell-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: .85rem;
    font-weight: 700;
    color: #fbbf24;
    background: rgba(251,191,36,.1);
    border: 1px solid rgba(251,191,36,.3);
    border-radius: 999px;
    padding: 7px 16px;
    text-decoration: none;
    white-space: nowrap;
    transition: background .18s, border-color .18s;
}
.mm-avm-upsell-link:hover {
    background: rgba(251,191,36,.2);
    border-color: rgba(251,191,36,.55);
    color: #fde68a;
}

/* Remove old split classes if still present */
.mm-avm-upsell-desktop { display: none !important; }
.mm-avm-upsell-mobile  { display: none !important; }

@media (max-width: 600px) {
    .mm-upsell-bar { flex-direction: column; align-items: flex-start; }
    .mm-avm-upsell-link { width: 100%; justify-content: center; }
}

/* History title row */
.mm-history-titlerow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 4px;
}
.mm-history-titlerow .mm-history-title { margin: 0; }

/* History S/N */
.mm-hist-sn {
    font-size: .85rem;
    font-weight: 800;
    color: #8ef6ff;
    flex-shrink: 0;
    min-width: 22px;
}

/* Update hist-row grid to account for new S/N column */
.mm-hist-row {
    grid-template-columns: auto 1fr auto auto auto;
}

/* ═══════════════════════════════════════════════
   Photo to Prompt — ptp-* classes
   Append to /assets/css/tools.css
═══════════════════════════════════════════════ */

/* ── Privacy notice in hero ── */
.ptp-privacy-note {
    margin: 12px auto 0;
    max-width: 560px;
    font-size: .82rem;
    color: #8ef6ff;
    background: rgba(0,255,213,.05);
    border: 1px solid rgba(0,255,213,.18);
    border-radius: 8px;
    padding: 8px 14px;
    line-height: 1.5;
}

/* ── Upload / drop zone ── */
.ptp-upload-zone {
    margin-top: 24px;
    border: 2px dashed var(--border-2);
    border-radius: 16px;
    background: rgba(255,255,255,.02);
    transition: border-color .2s, background .2s;
    min-height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: default;
    position: relative;
}
.ptp-upload-zone.ptp-dz-over {
    border-color: #00ffd5;
    background: rgba(0,255,213,.05);
}

.ptp-upload-prompt {
    text-align: center;
    padding: 32px 20px;
}
.ptp-upload-icon {
    font-size: 2.8rem;
    margin-bottom: 12px;
    line-height: 1;
}
.ptp-upload-label {
    font-size: 1rem;
    color: var(--text-1);
    margin-bottom: 6px;
}
.ptp-browse-btn {
    background: none;
    border: none;
    color: #8ef6ff;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
}
.ptp-browse-btn:hover { color: #00ffd5; }
.ptp-upload-hint {
    font-size: .78rem;
    color: var(--muted);
}

/* ── Preview after file selected ── */
.ptp-preview-wrap {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    width: 100%;
}
.ptp-preview-img {
    width: 110px;
    height: 110px;
    object-fit: cover;
    border-radius: 12px;
    border: 2px solid var(--border-2);
    flex-shrink: 0;
}
.ptp-preview-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 0;
}
.ptp-preview-name {
    font-size: .9rem;
    color: var(--text-1);
    font-weight: 600;
    word-break: break-all;
}
.ptp-preview-size {
    font-size: .8rem;
    color: var(--muted);
}
.ptp-remove-btn {
    background: rgba(239,68,68,.1);
    border: 1px solid rgba(239,68,68,.3);
    color: #fca5a5;
    border-radius: 8px;
    padding: 5px 12px;
    font-size: .8rem;
    cursor: pointer;
    align-self: flex-start;
    transition: background .15s;
}
.ptp-remove-btn:hover { background: rgba(239,68,68,.2); }

/* ── Result panel ── */
.ptp-result-panel {
    background: var(--bg-1);
    border: 1px solid var(--border-2);
    border-radius: 16px;
    overflow: hidden;
}
.ptp-result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-2);
    background: rgba(255,255,255,.02);
}
.ptp-result-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-1);
    margin: 0;
}
.ptp-result-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.ptp-result-meta {
    padding: 10px 20px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.ptp-result-box-wrap {
    padding: 16px 20px;
    position: relative;
}
.ptp-result-box {
    font-family: inherit;
    font-size: .9rem;
    line-height: 1.7;
    color: #e8eefc;
    white-space: pre-wrap;
    word-break: break-word;
    margin: 0;
    background: rgba(255,255,255,.03);
    border: 1px solid var(--border-2);
    border-radius: 10px;
    padding: 14px 16px;
    max-height: 420px;
    overflow-y: auto;
}
.ptp-result-note {
    padding: 0 20px 16px;
    font-size: .78rem;
    color: var(--muted);
    margin: 0;
}
.ptp-close-btn {
    background: rgba(239,68,68,.1) !important;
    border-color: rgba(239,68,68,.3) !important;
    color: #fca5a5 !important;
}
.ptp-close-btn:hover { background: rgba(239,68,68,.2) !important; }

/* ── History rows ── */
.ptp-hist-file {
    display: block;
    font-size: .75rem;
    color: #8ef6ff;
    margin-bottom: 2px;
}
.ptp-hist-snippet {
    display: block;
    font-size: .82rem;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* ── Viral Video Prompts platform chip (tools/usage.php note cell) ── */
.tools-usage-platform-chip {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    background: rgba(0, 255, 213, 0.10);
    border: 1px solid rgba(0, 255, 213, 0.22);
    color: #00ffd5;
    vertical-align: middle;
    white-space: nowrap;
}

/* ── Viral Video "Active + New" inline row ── */
.tools-card-status-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.tools-card-status.is-active {
    /* keep existing style, just ensure it sits inline */
    display: inline-block;
}

.tools-card-new-badge {
    display: inline-block;
    background: linear-gradient(135deg, #00ffd5, #00b4a0);
    color: #0a0a0a;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 20px;
    line-height: 1.4;
}

.tools-card-new-count {
    font-size: 0.75rem;
    color: rgba(0, 255, 213, 0.85);
    font-weight: 600;
}

/* ── Movie Maker: prompt display in result panel ── */
.mm-result-prompt {
    margin: 12px 0 4px;
    padding: 10px 14px;
    background: rgba(0, 255, 213, 0.05);
    border: 1px solid rgba(0, 255, 213, 0.18);
    border-radius: 10px;
    font-size: .875rem;
    line-height: 1.5;
    color: #c8d8f0;
    word-break: break-word;
}
.mm-result-prompt-label {
    font-weight: 700;
    color: #00ffd5;
    margin-right: 6px;
    white-space: nowrap;
}
.mm-result-prompt-text {
    color: #d5e3f7;
    font-style: italic;
}

/* ═══════════════════════════════════════════════════════════════
   Movie Maker — Inline version selector inside input zone
   Append this block to assets/css/tools.css
   ═══════════════════════════════════════════════════════════════

   Layout goal:
     Desktop (≥ 600px): [  Version select + cost pill  ] [ Generate btn ]
     Mobile  (< 600px):  [ Version select + cost pill  (full width)     ]
                         [        Generate btn (full width)              ]
   ═══════════════════════════════════════════════════════════════ */

/* ── Action row: wraps version selector + submit button ──────── */
.mm-action-row {
    display: flex;
    align-items: flex-end;       /* align bottom edges — label vs button */
    gap: 12px;
    margin-top: 18px;
    flex-wrap: wrap;             /* wraps on narrow viewports */
}

/* ── Version selector wrapper (left / top) ───────────────────── */
.mm-version-inline-wrap {
    flex: 1 1 220px;             /* grows, won't shrink below 220px */
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* Tiny label above the select */
.mm-version-inline-label {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: rgba(0, 255, 213, .7);
    padding-left: 2px;
    white-space: nowrap;
}

/* Row containing the <select> + cost pill */
.mm-version-inline-inner {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

/* The actual <select> */
.mm-version-select {
    flex: 1;
    min-width: 0;
    padding: 11px 14px;
    border-radius: 10px;
    border: 1px solid rgba(0, 255, 213, .25);
    background: rgba(0, 0, 0, .45);
    color: #e8eefc;
    font-size: .9rem;
    font-family: inherit;
    outline: none;
    cursor: pointer;
    appearance: auto;           /* keep native arrow — readable in dark themes */
    transition: border-color .2s, box-shadow .2s;
    /* truncate long text gracefully */
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}
.mm-version-select:focus {
    border-color: rgba(0, 255, 213, .55);
    box-shadow: 0 0 0 3px rgba(0, 255, 213, .09);
}
.mm-version-select:hover {
    border-color: rgba(0, 255, 213, .38);
}

/* Credit cost pill beside the select */
.mm-version-cost-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 7px 11px;
    border-radius: 8px;
    background: rgba(251, 191, 36, .1);
    border: 1px solid rgba(251, 191, 36, .3);
    color: #fbbf24;
    font-size: .78rem;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 1;
}
.mm-version-cost-icon {
    font-size: .85rem;
    flex-shrink: 0;
}

/* Optional plan-required note below the select */
.mm-version-plan-note {
    font-size: .75rem;
    color: var(--muted, #9aa3af);
    margin: 0;
    padding-left: 2px;
}
.mm-version-plan-note a {
    color: #8ef6ff;
}

/* ── Submit button — right side / bottom ─────────────────────── */
.mm-submit-btn {
    flex-shrink: 0;              /* never compress the button */
    white-space: nowrap;
    align-self: flex-end;        /* anchor to bottom of the flex row */
}

/* ── Mobile overrides (< 600px) ──────────────────────────────── */
@media (max-width: 599px) {
    .mm-action-row {
        flex-direction: column;  /* stack vertically */
        align-items: stretch;    /* full-width children */
        gap: 10px;
    }

    .mm-version-inline-wrap {
        flex: none;
        width: 100%;
    }

    .mm-version-select {
        font-size: .88rem;
        padding: 12px 13px;
    }

    .mm-submit-btn {
        width: 100%;
        justify-content: center;
        padding: 14px 20px;
    }
}

/* ================================================================
   music-maker.css  —  append to your existing dashboard tool CSS
   (e.g. dashboard-avmpage.css or your main tools stylesheet)
   ================================================================ */

/* ── Version selector + submit button: side-by-side on desktop ── */
.mm-action-row {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 14px;
}

/* Version wrapper takes available space, button stays fixed width */
.mm-version-inline-wrap {
    flex: 1 1 200px;
    min-width: 0;
}

.mm-version-inline-inner {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mm-version-select {
    flex: 1;
    width: 100%;
    background: #0d1b2a;
    color: #e2e8f0;
    border: 1px solid rgba(0, 255, 213, 0.22);
    border-radius: 10px;
    padding: 11px 14px;
    font-size: .9rem;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2300ffd5' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    transition: border-color .2s, box-shadow .2s;
}

.mm-version-select:hover,
.mm-version-select:focus {
    border-color: rgba(0, 255, 213, 0.5);
    box-shadow: 0 0 0 3px rgba(0, 255, 213, 0.08);
}

.mm-version-select option {
    background: #0d1b2a;
    color: #e2e8f0;
}

/* Submit button stays auto-width, doesn't stretch */
.mm-submit-btn {
    flex: 0 0 auto;
    white-space: nowrap;
}

/* Plan note under selector */
.mm-version-plan-note {
    flex: 1 1 100%;
    font-size: .8rem;
    color: var(--muted);
    margin: 0;
}

/* ── Mobile: stack selector above button ── */
@media (max-width: 640px) {
    .mm-action-row {
        flex-direction: column;
        align-items: stretch;
    }

    .mm-version-inline-wrap {
        flex: 1 1 100%;
        width: 100%;
    }

    .mm-version-select {
        width: 100%;
    }

    .mm-submit-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ── YouTube embed wrapper (music-maker sample videos) ── */
.mum-yt-wrap {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 10px;
    background: #000;
    margin-bottom: 4px;
}

.mum-yt-wrap iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* ── Credit bar ── */
.tool-credit-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 255, 213, 0.05);
    border: 1px solid rgba(0, 255, 213, 0.15);
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 16px;
    font-size: .875rem;
    color: #b8c4d4;
    flex-wrap: wrap;
}

.tool-credit-icon {
    font-size: 1rem;
}

/* ── Char count ── */
.mm-char-count {
    font-size: .78rem;
    color: var(--muted);
    white-space: nowrap;
    transition: color .2s;
}


/* ── Append these rules to music-maker-added.css (or your tool stylesheet) ── */

/* Container when section has links — same visual as .mm-section-box */
.mm-section-links {
    display: block;
    padding: 14px 16px;
    background: var(--bg-3, #0d1b2a);
    border: 1px solid rgba(0, 255, 213, 0.1);
    border-radius: 10px;
    font-size: .88rem;
    line-height: 1.6;
    white-space: normal;   /* override pre white-space */
    word-break: break-word;
}

/* One platform per row */
.mm-platform-link-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.mm-platform-link-row:last-of-type {
    border-bottom: none;
}

/* The clickable platform name */
.mm-platform-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: 999px;
    background: rgba(0, 255, 213, 0.08);
    border: 1px solid rgba(0, 255, 213, 0.22);
    color: #8ef6ff;
    font-size: .83rem;
    font-weight: 600;
    text-decoration: none;
    transition: background .18s, border-color .18s, color .18s;
    white-space: nowrap;
}
.mm-platform-link::after {
    content: ' ↗';
    font-size: .75rem;
    opacity: .7;
}
.mm-platform-link:hover,
.mm-platform-link:focus {
    background: rgba(0, 255, 213, 0.16);
    border-color: rgba(0, 255, 213, 0.45);
    color: #00ffd5;
    text-decoration: none;
}

/* Plain text note below the links */
.mm-platform-note {
    margin: 8px 0 0;
    font-size: .82rem;
    color: var(--muted, #6b7280);
    line-height: 1.5;
}


/* ═══════════════════════════════════════════════════════════════
   Character Sheet Maker  (tools/character-sheet-maker.php)
   Append this block to assets/css/tools.css
   ═══════════════════════════════════════════════════════════════ */

/* ── Modal utility classes (shared reuse pattern) ── */
.tool-modal-close-btn {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    color: #9aa3af;
    font-size: 1.2rem;
    cursor: pointer;
    line-height: 1;
    padding: 2px;
    transition: color .15s;
}
.tool-modal-close-btn:hover { color: #fca5a5; }

.tool-modal-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin: 10px 0 16px;
}

.tool-modal-pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 600;
    background: rgba(0,255,213,.08);
    border: 1px solid rgba(0,255,213,.25);
    color: #8ef6ff;
    text-decoration: none;
}

.tool-modal-pill--purple {
    background: rgba(139,92,246,.08);
    border-color: rgba(139,92,246,.3);
    color: #c4b5fd;
}

/* ── Input zone footer (hint + char count row) ── */
.csm-input-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    flex-wrap: wrap;
    gap: 8px;
}

/* ── Hidden raw textarea for copy-all ── */
.csm-raw-textarea {
    position: absolute;
    left: -9999px;
    opacity: 0;
    pointer-events: none;
    width: 1px;
    height: 1px;
}

/* ── History note line ── */
.csm-history-note {
    font-size: .8rem;
    color: var(--muted);
    margin: -6px 0 12px;
}

/* ── Version tag in history rows ── */
.csm-hist-version-tag {
    font-size: .72rem;
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(99,102,241,.12);
    border: 1px solid rgba(99,102,241,.25);
    color: #a5b4fc;
    white-space: nowrap;
}

/* ── Access note card ── */
.tools-access-note {
    margin: 24px 0 0;
    padding: 16px 18px;
    border-radius: 14px;
    background: #0b1730;
    border: 1px solid rgba(120,170,255,.18);
    color: #e8eefc;
}

.csm-access-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.csm-access-sub {
    font-size: .96rem;
    color: #d5def1;
}

.csm-limit-hit {
    color: #fca5a5;
    font-weight: 600;
}

.csm-limit-ok {
    color: #6ee7b7;
}

/* ── Admin bar ── */
.csm-admin-bar {
    margin-top: 20px;
    padding: 12px 16px;
    background: rgba(0,255,213,.05);
    border: 1px dashed rgba(0,255,213,.2);
    border-radius: 10px;
    font-size: .85rem;
    color: var(--muted);
}

.csm-admin-bar a {
    color: #8ef6ff;
}