/* YouTube Tag Generator: page styles on top of css/apps.css */

/* ---------- Form ---------- */
.textarea.yt-ta { min-height: 76px; }
.textarea.yt-ta--desc { min-height: 110px; }
.yt-count { font-size: 0.78rem; color: var(--fg-3); text-align: right; margin-top: -2px; transition: color 0.2s; }
.field > .yt-count:last-child { margin-bottom: 0; }

.yt-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.yt-row .field { margin-bottom: 0; }
.yt-opts {
    display: grid;
    gap: 6px;
    padding: 10px 12px;
    min-height: 44px;
    border-radius: 11px;
    border: 1px solid var(--line-soft);
    background: rgba(7, 11, 22, 0.5);
}

.yt-generate { width: 100%; justify-content: center; margin-top: 20px; }
.yt-generate:disabled { opacity: 0.7; cursor: progress; transform: none; }

/* ---------- Output ---------- */
.yt-side { align-content: start; }
.textarea.yt-out { min-height: 150px; font-size: 0.88rem; line-height: 1.6; }

.yt-meter {
    height: 6px;
    margin: 14px 0 16px;
    border-radius: 999px;
    background: var(--ink-3);
    overflow: hidden;
}
.yt-meter__fill {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: var(--signal);
    transition: width 0.5s var(--ease-out), background-color 0.3s;
}

.yt-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.yt-stats .stat { min-width: 0; }
.yt-stats .stat b { font-size: 1.2rem; transition: color 0.3s; }

#copyTags.is-done { color: var(--mint); border-color: rgba(94, 230, 181, 0.45); }

/* ---------- Tag preview ---------- */
.tag-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 96px;
    max-height: 420px;
    overflow-y: auto;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--line-soft);
    background: rgba(7, 11, 22, 0.5);
    align-content: flex-start;
}
.tag-preview .no-tags {
    margin: auto;
    color: var(--fg-3);
    font-size: 0.88rem;
}
.tag-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 4px 4px 11px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--ink-2);
    color: var(--fg);
    font-size: 0.85rem;
    line-height: 1.4;
    animation: yt-tag-in 0.35s var(--ease-out) both;
    animation-delay: calc(var(--i, 0) * 15ms);
    transition: border-color 0.2s, background-color 0.2s;
}
.tag-item:hover { border-color: rgba(var(--signal-rgb), 0.5); background: rgba(var(--signal-rgb), 0.08); }
@keyframes yt-tag-in { from { opacity: 0; transform: translateY(4px) scale(0.97); } }
.tag-item .tag-remove {
    display: inline-grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    color: var(--fg-3);
    font-size: 0.75rem;
    transition: color 0.2s, background-color 0.2s;
}
.tag-item .tag-remove:hover { color: var(--rose); background: rgba(255, 122, 144, 0.12); }

/* ---------- Notifications ---------- */
.yt-notes {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: min(360px, calc(100vw - 32px));
    pointer-events: none;
}
.yt-note {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 10px 11px 14px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(18, 26, 47, 0.96);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    box-shadow: 0 16px 40px -14px rgba(0, 0, 0, 0.7);
    color: var(--fg);
    font-size: 0.9rem;
    line-height: 1.4;
    overflow: hidden;
    pointer-events: auto;
    animation: yt-note-in 0.35s var(--ease-out);
}
.yt-note.out { opacity: 0; transform: translateY(6px); transition: opacity 0.25s, transform 0.25s; }
@keyframes yt-note-in { from { opacity: 0; transform: translateY(10px) scale(0.98); } }
.yt-note__icon { flex: none; color: var(--signal); }
.yt-note__msg { flex: 1; min-width: 0; }
.yt-note__close {
    flex: none;
    display: inline-grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 7px;
    color: var(--fg-3);
    transition: color 0.2s, background-color 0.2s;
}
.yt-note__close:hover { color: var(--fg); background: var(--ink-3); }
.yt-note__bar {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 2px;
    width: 100%;
    background: currentColor;
    opacity: 0.35;
    transform-origin: left;
    animation-name: yt-note-bar;
    animation-timing-function: linear;
    animation-fill-mode: forwards;
}
@keyframes yt-note-bar { to { transform: scaleX(0); } }
.yt-note--success { border-color: rgba(94, 230, 181, 0.4); }
.yt-note--success .yt-note__icon, .yt-note--success .yt-note__bar { color: var(--mint); }
.yt-note--error { border-color: rgba(255, 122, 144, 0.45); }
.yt-note--error .yt-note__icon, .yt-note--error .yt-note__bar { color: var(--rose); }
.yt-note--warning { border-color: rgba(var(--amber-rgb), 0.45); }
.yt-note--warning .yt-note__icon, .yt-note--warning .yt-note__bar { color: var(--amber); }
.yt-note--info .yt-note__bar, .yt-note--loading .yt-note__bar { color: var(--signal); }

/* ---------- Responsive ---------- */
@media (max-width: 480px) {
    .yt-row { grid-template-columns: 1fr; }
    .yt-stats { grid-template-columns: 1fr 1fr; }
    .yt-stats .stat:first-child { grid-column: 1 / -1; }
    .yt-notes { right: 16px; bottom: 16px; }
}
