/* ═══════════════════════════════════════════════════
   Showcase Formatter — Styles
   ═══════════════════════════════════════════════════ */

.showcase-main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
    min-height: 80vh;
}

/* ─── Hero ─── */

.showcase-hero {
    text-align: center;
    margin-bottom: 2.5rem;
}

.showcase-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #3b82f6;
}

.showcase-hero h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0.4rem 0 0.5rem;
}

.showcase-subtitle {
    color: #64748b;
    font-size: 1rem;
    margin: 0;
}

/* ─── Workspace layout ─── */

.showcase-workspace {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 1.5rem;
    align-items: start;
}

@media (max-width: 900px) {
    .showcase-workspace {
        grid-template-columns: 1fr;
    }
}

/* ─── Controls panel ─── */

.showcase-controls {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.25rem;
    position: sticky;
    top: 5rem;
}

.control-group {
    margin-bottom: 1.25rem;
}

.control-group:last-child {
    margin-bottom: 0;
}

.control-group h3 {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #94a3b8;
    margin: 0 0 0.6rem;
}

.control-hint {
    font-size: 0.7rem;
    color: #94a3b8;
    margin: 0.3rem 0 0;
    line-height: 1.3;
}

/* ─── Option toggles ─── */

.option-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0;
    cursor: pointer;
    font-size: 0.82rem;
    color: #475569;
    user-select: none;
}

.option-toggle input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: #3b82f6;
    cursor: pointer;
    flex-shrink: 0;
}

.select-all-toggle {
    padding-bottom: 0.3rem;
    font-weight: 600;
    color: #334155;
}

/* ─── Project list ─── */

.project-list {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    max-height: 420px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.project-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.55rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.12s;
    border: 1px solid transparent;
}

.project-item:hover {
    background: #f1f5f9;
}

.project-item.selected {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.project-item input {
    width: 14px;
    height: 14px;
    accent-color: #3b82f6;
    cursor: pointer;
    flex-shrink: 0;
}

.project-item-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.project-item-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.project-item-lang {
    font-size: 0.68rem;
    color: #94a3b8;
}

/* ─── Platform windows grid ─── */

.platform-windows {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.window-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    background: #fff;
    border: 2px dashed #e2e8f0;
    border-radius: 12px;
    color: #94a3b8;
    font-size: 0.9rem;
}

.window-empty-state .empty-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    opacity: 0.6;
}

/* ─── Individual platform window ─── */

.platform-window {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.15s;
}

.platform-window:hover {
    border-color: #cbd5e1;
}

.pw-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    background: #fafbfc;
}

.pw-platform-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #334155;
}

.pw-icon {
    font-size: 1rem;
    width: 1.2rem;
    text-align: center;
}

/* ─── Title/Body sections ─── */

.pw-content {
    display: flex;
    flex-direction: column;
}

.pw-section {
    border-bottom: 1px solid #f1f5f9;
}

.pw-section:last-child {
    border-bottom: none;
}

.pw-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.4rem 1rem;
    background: #f8fafc;
    border-bottom: 1px solid #f1f5f9;
}

.pw-section-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #94a3b8;
}

.pw-title-section .pw-title-content {
    padding: 0.6rem 1rem;
    font-family: 'SF Mono', 'Fira Code', 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.4;
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
    background: #fefefe;
}

.pw-body-section {
    max-height: 320px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.pw-body-section .pw-body-content {
    padding: 0.6rem 1rem;
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'SF Mono', 'Fira Code', 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    line-height: 1.55;
    color: #334155;
    tab-size: 4;
}

.pw-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.pw-char-count {
    font-size: 0.7rem;
    color: #94a3b8;
    font-weight: 500;
}

.pw-char-count.over-limit {
    color: #ef4444;
    font-weight: 600;
}

.pw-copy-btn {
    padding: 0.2rem 0.55rem;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    font-size: 0.68rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    background: #fff;
    color: #64748b;
}

.pw-copy-btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #334155;
}

.pw-copy-btn.copied {
    background: #22c55e;
    border-color: #22c55e;
    color: #fff;
}

.pw-copy-all-btn {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.8rem;
    border: none;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    background: #3b82f6;
    color: #fff;
}

.pw-copy-all-btn:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

.pw-copy-all-btn.copied {
    background: #22c55e;
}

.pw-body {
    max-height: 320px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.pw-body pre {
    margin: 0;
    padding: 0.85rem 1rem;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'SF Mono', 'Fira Code', 'JetBrains Mono', 'Cascadia Code', monospace;
    font-size: 0.78rem;
    line-height: 1.55;
    color: #334155;
    tab-size: 4;
}

/* ─── Platform-specific header colors ─── */

.platform-window[data-platform="reddit"] .pw-header {
    background: linear-gradient(135deg, #fff5f5, #fafbfc);
    border-bottom-color: #fecaca;
}

.platform-window[data-platform="discord"] .pw-header {
    background: linear-gradient(135deg, #f5f3ff, #fafbfc);
    border-bottom-color: #c4b5fd;
}

.platform-window[data-platform="twitter"] .pw-header {
    background: linear-gradient(135deg, #f0f9ff, #fafbfc);
    border-bottom-color: #bae6fd;
}

.platform-window[data-platform="readme"] .pw-header {
    background: linear-gradient(135deg, #f0fdf4, #fafbfc);
    border-bottom-color: #bbf7d0;
}

.platform-window[data-platform="plain"] .pw-header {
    background: linear-gradient(135deg, #f8fafc, #fafbfc);
    border-bottom-color: #e2e8f0;
}

/* ─── Expand/collapse ─── */

.pw-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.75rem;
    color: #94a3b8;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    transition: all 0.12s;
}

.pw-toggle-btn:hover {
    background: #f1f5f9;
    color: #475569;
}

.platform-window.collapsed .pw-content {
    display: none;
}

.platform-window.collapsed .pw-toggle-btn {
    transform: rotate(-90deg);
}

/* ─── Toast ─── */

.copy-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(120%);
    padding: 0.65rem 1.5rem;
    background: #1e293b;
    color: #fff;
    font-size: 0.82rem;
    font-weight: 500;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
    z-index: 1000;
}

.copy-toast.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}