/* assets/css/style.css */

/* Light background, dark text */
body {
    background: #f5f5f5;
    color: #222;
}

/* Optional subtle navbar border */
.navbar {
    border-bottom: 1px solid #ddd;
}

/* Paste textarea */
textarea.paste-area {
    font-family: "Fira Code", monospace;
    min-height: 320px;
}

/* Meta info under title */
.paste-meta {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* Code block container on paste page */
article.box,
article.paste-box {
    background: #ffffff;
}

/* Make Prism code blocks sit nicely */
pre[class*="language-"] {
    margin: 0 !important;
    padding: 1rem !important;
    background: #f7f7f7 !important;
    border-radius: 4px;
    font-size: 14px;
}

/* ------------------------------
   Tiny toggle switches
------------------------------ */
.rm-switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 24px;
}

.rm-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.rm-switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #ddd;
    border-radius: 999px;
    transition: background 0.2s ease;
}

.rm-switch-slider::before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
    transition: transform 0.2s ease;
}

/* default ON color (green) */
.rm-switch input:checked+.rm-switch-slider {
    background: #23d160;
    /* Bulma success */
}

/* red variant for burn-after-read (optional) */
.rm-switch-danger {
    background: #ddd;
}

.rm-switch input:checked+.rm-switch-danger {
    background: #ff3860;
    /* Bulma danger */
}

.rm-switch input:checked+.rm-switch-slider::before {
    transform: translateX(22px);
}

/* focus ring for accessibility */
.rm-switch input:focus+.rm-switch-slider {
    box-shadow: 0 0 0 2px rgba(50, 115, 220, .4);
}

/* =========================
   PasteWizard Theme Additions
   (safe to append at end)
   ========================= */

/* Softer background + better contrast */
body {
    background: radial-gradient(circle at top left, #f9fafb 0, #e5e7eb 40%, #d1d5db 100%);
    color: #111827;
}

/* Section padding slightly tighter on large screens */
.section {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
}

/* Boxes / cards: subtle elevation */
.box {
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

/* Page header helper (used on Recent + can reuse elsewhere) */
.pw-page-header .title {
    margin-bottom: .25rem;
}

.pw-page-header .subtitle {
    margin-top: 0;
}

/* Recent pastes grid + cards */
.pw-recent-grid {
    margin-top: 1rem;
}

.pw-recent-card {
    position: relative;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(255, 255, 255, 0.96);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition:
        transform 0.12s ease-out,
        box-shadow 0.12s ease-out,
        border-color 0.12s ease-out,
        background 0.12s ease-out;
    text-decoration: none;
    color: inherit;
}

.pw-recent-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 35px rgba(15, 23, 42, 0.18);
    border-color: rgba(59, 130, 246, 0.7);
    background: #f9fafb;
}

.pw-recent-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.pw-recent-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #0f172a;
    margin: 0;
    line-height: 1.3;
}

.pw-lang-pill {
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.7);
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.7rem;
    text-transform: lowercase;
}

.pw-recent-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    font-size: 0.78rem;
    color: #6b7280;
}

.pw-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.pw-recent-footer {
    margin-top: 0.5rem;
    display: flex;
    justify-content: flex-end;
}

/* Make tag pill in footer a bit smaller */
.pw-recent-footer .tag {
    font-size: 0.7rem;
}

/* Keep your existing rm-switch toggles visually nice on new background */
.rm-switch-slider {
    background: #e5e7eb;
}

.rm-switch input:checked+.rm-switch-slider {
    background: #3273dc;
}

/* ==== PasteWizard Pastebin-style toolbar ==== */

.pw-toolbar {
    padding: 0.45rem 0.75rem;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    background: #fdfdfd;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    margin-bottom: 1rem;
}

.pw-toolbar-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.pw-toolbar-row-top {
    margin-bottom: 0.35rem;
}

.pw-chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.pw-chip {
    font-size: 0.75rem;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    background: #f3f4f6;
    color: #4b5563;
    border: 1px solid rgba(209, 213, 219, 0.8);
    line-height: 1.3;
}

.pw-chip-lang {
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.04em;
    background: #ede9fe;
    color: #4c1d95;
    border-color: #c4b5fd;
}

.pw-chip-warn {
    background: #fef3c7;
    color: #92400e;
    border-color: #fcd34d;
}

.pw-chip-burn {
    background: #fee2e2;
    color: #b91c1c;
    border-color: #fecaca;
}

.pw-chip-likes {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.pw-chip-sep {
    width: 1px;
    height: 12px;
    background: rgba(156, 163, 175, 0.9);
    margin: 0 3px;
}

/* Share buttons (right side) */

.pw-toolbar-share {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.pw-share-btn {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-radius: 4px;
    border: none;
    color: #fff;
}

.pw-share-btn-fb {
    background: #1877f2;
}

.pw-share-btn-tw {
    background: #1da1f2;
}

.pw-share-btn:hover {
    filter: brightness(1.05);
}

/* Bottom row: short link + QR + actions */

.pw-toolbar-row-bottom {
    padding-top: 0.35rem;
    border-top: 1px solid #e5e7eb;
}

.pw-toolbar-short {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.pw-toolbar-short a {
    color: #4f46e5;
}

.pw-toolbar-qr {
    width: 56px;
    height: 56px;
    border-radius: 4px;
    border: 1px solid #e5e7eb;
    background: #fff;
}

/* Action buttons (copy/raw/download/...) */

.pw-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    justify-content: flex-end;
    margin-left: auto;
}

.pw-action-btn {
    background: #f9fafb;
    border-radius: 4px;
    border: 1px solid #e5e7eb;
    font-size: 0.75rem;
    text-transform: lowercase;
    color: #374151;
}

.pw-action-btn:hover {
    background: #eef2ff;
    border-color: #4f46e5;
    color: #111827;
}

.pw-action-btn-edit {
    background: #ecfdf3;
    border-color: #bbf7d0;
    color: #166534;
}

.pw-action-btn-edit:hover {
    background: #bbf7d0;
    border-color: #16a34a;
}

.pw-action-btn-delete {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}

.pw-action-btn-delete:hover {
    background: #fee2e2;
    border-color: #ef4444;
}

/* Responsive tweaks */

@media (max-width: 768px) {
    .pw-toolbar-share {
        flex-direction: row;
    }

    .pw-toolbar-actions {
        justify-content: flex-start;
        margin-left: 0;
    }

    .pw-toolbar-row-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* ===============================
   CodeMirror – Pastebin style
   =============================== */

/* Outer editor container */
.pw-cm-container {
    margin-top: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

/* CodeMirror root panel */
.CodeMirror {
    font-size: 14px;
    line-height: 1.45;
    height: auto !important;
    /* Let scroll area control height */
    padding: 0;
}

/* The scrollable region (the actual viewport) */
.CodeMirror-scroll {
    max-height: 650px !important;
    /* LIMIT like Pastebin */
    min-height: 350px !important;
    /* Always looks big */
    overflow-y: auto !important;
    overflow-x: auto !important;
}

/* Optional: better scrollbar */
.CodeMirror-scroll::-webkit-scrollbar {
    width: 9px;
    height: 9px;
}

.CodeMirror-scroll::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 6px;
}

.CodeMirror-scroll::-webkit-scrollbar-track {
    background: #f1f5f9;
}

/* ========= Recent Pastes page ========= */

.pw-page-header {
    padding: 0.9rem 1.1rem;
    border-radius: 10px;
    background: radial-gradient(circle at top left, #eef2ff 0, #f9fafb 40%, #fff 100%);
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.pw-page-header-badge {
    display: inline-block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    background: #4f46e5;
    color: #ffffff;
    margin-bottom: 0.35rem;
}

/* Card grid */

.pw-recent-grid .pw-recent-card {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    padding: 0.8rem 0.95rem 0.8rem;
    background: linear-gradient(180deg, #f9fafb 0, #ffffff 35%);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
    transition:
        transform 0.11s ease-out,
        box-shadow 0.11s ease-out,
        border-color 0.11s ease-out,
        background 0.11s ease-out;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.pw-recent-grid .pw-recent-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border-top: 3px solid transparent;
    background-image: linear-gradient(90deg, #4f46e5, #22c55e, #06b6d4);
    background-size: 200% 3px;
    background-repeat: no-repeat;
    background-position: 0 0;
    opacity: 0.85;
    pointer-events: none;
}

.pw-recent-grid .pw-recent-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
    border-color: #c7d2fe;
    background: linear-gradient(180deg, #eef2ff 0, #ffffff 38%);
}

.pw-recent-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.4rem;
}

/* Language pill (colorful) */

.pw-recent-lang-pill {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.18rem 0.6rem;
    border-radius: 999px;
    background: #eef2ff;
    color: #3730a3;
    border: 1px solid #c7d2fe;
}

/* Views pill */

.pw-recent-size-pill {
    font-size: 0.7rem;
    padding: 0.16rem 0.45rem;
    border-radius: 999px;
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

/* Title & snippet */

.pw-recent-title {
    font-size: 0.96rem;
    font-weight: 600;
    color: #111827;
    margin: 0.1rem 0 0.05rem;
}

.pw-recent-snippet {
    font-size: 0.8rem;
    color: #4b5563;
    margin: 0;
}

/* Meta row */

.pw-recent-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 0.1rem;
}

.pw-meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.72rem;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    background: #f3f4f6;
    color: #4b5563;
}

.pw-meta-icon {
    font-size: 0.85rem;
}

/* Footer CTA */

.pw-recent-footer {
    margin-top: 0.3rem;
    display: flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.78rem;
    color: #4f46e5;
}

.pw-recent-footer-label {
    font-weight: 600;
}

.pw-recent-footer-arrow {
    transition: transform 0.1s ease-out;
}

.pw-recent-card:hover .pw-recent-footer-arrow {
    transform: translateX(2px);
}

/* Optional: language-based accent colors
   (fallback is the default purple one above) */

.pw-lang-javascript,
.pw-lang-js {
    background: #fef3c7;
    color: #92400e;
    border-color: #facc15;
}

.pw-lang-php {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #93c5fd;
}

.pw-lang-html,
.pw-lang-htmlmixed {
    background: #fee2e2;
    color: #b91c1c;
    border-color: #fecaca;
}

.pw-lang-css {
    background: #ecfeff;
    color: #0e7490;
    border-color: #a5f3fc;
}

.pw-lang-sql {
    background: #fef9c3;
    color: #854d0e;
    border-color: #facc15;
}

.pw-lang-python,
.pw-lang-py {
    background: #dcfce7;
    color: #166534;
    border-color: #4ade80;
}

/* Mobile tweaks */

@media (max-width: 768px) {
    .pw-recent-grid .pw-recent-card {
        padding: 0.75rem 0.8rem;
    }
}

/* ======================================
   Improved Recent Page Header Spacing
   ====================================== */

.pw-page-header {
    padding: 1.6rem 1.8rem;
    border-radius: 14px;
    background: radial-gradient(circle at top left, #eef2ff 0, #f9fafb 40%, #ffffff 100%);
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 3px rgba(15, 23, 42, 0.05);
    margin-bottom: 2.2rem !important;
}

/* Badge above the title */
.pw-page-header-badge {
    display: inline-block;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    background: #4f46e5;
    color: #ffffff;
    margin-bottom: 0.75rem;
}

/* Title with better spacing + modern style */
.pw-page-header-title {
    font-size: 1.85rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
    color: #1f2937;
}

/* Subtitle spacing + readability */
.pw-page-header-subtitle {
    font-size: 0.95rem;
    color: #6b7280;
    line-height: 1.55;
    margin-bottom: 0.2rem;
}

/* Dashboard metrics + filters */
.pw-dashboard-metrics .pw-metric-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 0.9rem 1.1rem;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.04);
    border: 1px solid rgba(148, 163, 184, 0.35);
}

.pw-metric-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.pw-metric-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.15rem;
}

.pw-metric-caption {
    font-size: 0.78rem;
    color: #9ca3af;
}

.pw-dashboard-filters {
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.35);
}

.pw-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.4rem;
}

.pw-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.1rem 0.6rem;
    border-radius: 999px;
    font-size: 0.7rem;
    background: #e5e7eb;
    color: #374151;
}

.pw-chip.is-info {
    background: #dbeafe;
    color: #1d4ed8;
}

/* Table + badges */
.pw-dashboard-table {
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.35);
}

.pw-paste-title-link {
    font-weight: 500;
    color: #111827;
}

.pw-paste-title-link:hover {
    color: #1d4ed8;
}

.pw-paste-flags {
    margin-top: 0.1rem;
    font-size: 0.7rem;
    color: #6b7280;
}

.pw-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.1rem 0.55rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 500;
}

.pw-badge-neutral {
    background: #e5e7eb;
    color: #374151;
}

.pw-badge-success {
    background: #dcfce7;
    color: #15803d;
}

.pw-badge-warning {
    background: #fef9c3;
    color: #92400e;
}

.pw-badge-danger {
    background: #fee2e2;
    color: #b91c1c;
}

/* Empty state */
.pw-empty-state {
    border-radius: 14px;
    text-align: left;
    border: 1px dashed #cbd5f5;
    background: linear-gradient(135deg, #eff6ff, #f9fafb);
}