/* ══════════════════════════════════════
   BanliyoWorks Studio — Editor Theme
   ══════════════════════════════════════ */

body:has(#bws-app) {
    margin: 0 !important;
    padding: 0 !important;
    background: #0a0a0a !important;
    overflow: hidden;
}

body:has(#bws-app) header,
body:has(#bws-app) footer,
body:has(#bws-app) nav,
body:has(#bws-app) .site-header,
body:has(#bws-app) .site-footer,
body:has(#bws-app) .wp-site-blocks > *:not(.entry-content),
body:has(#bws-app) #masthead,
body:has(#bws-app) #colophon,
body:has(#bws-app) .navigation,
body:has(#bws-app) .sidebar,
body:has(#bws-app) #wpadminbar {
    display: none !important;
}

body:has(#bws-app) .entry-content,
body:has(#bws-app) .wp-site-blocks,
body:has(#bws-app) main,
body:has(#bws-app) article {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

#bws-app {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    background: #0a0a0a;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #e0e0e0;
    z-index: 99999;
}

#bws-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 28px;
    background: #111111;
    border-bottom: 1px solid #1e1e1e;
    flex-shrink: 0;
    user-select: none;
}

#bws-logo {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #888;
}

#bws-logo span {
    color: #c8a46e;
    font-weight: 700;
}

#bws-stats {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: #555;
    font-variant-numeric: tabular-nums;
}

#bws-editor-wrap {
    flex: 1;
    display: flex;
    justify-content: center;
    overflow-y: auto;
    padding: 60px 20px 100px;
}

#bws-editor-wrap::-webkit-scrollbar { width: 6px; }
#bws-editor-wrap::-webkit-scrollbar-track { background: transparent; }
#bws-editor-wrap::-webkit-scrollbar-thumb { background: #222; border-radius: 3px; }

#bws-editor {
    width: 100%;
    max-width: 680px;
    min-height: 60vh;
    outline: none;
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 18px;
    line-height: 1.85;
    color: #d4d4d4;
    caret-color: #c8a46e;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

#bws-editor:empty::before {
    content: attr(data-placeholder);
    color: #333;
    font-style: italic;
    pointer-events: none;
}

#bws-editor::selection {
    background: rgba(200, 164, 110, 0.25);
}

#bws-trigger-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
    z-index: 100000;
}

.bws-toast {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(200, 164, 110, 0.12);
    border: 1px solid rgba(200, 164, 110, 0.25);
    border-radius: 100px;
    color: #c8a46e;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.3px;
    animation: bws-toast-in 0.3s ease, bws-toast-out 0.3s ease 1.5s forwards;
    backdrop-filter: blur(12px);
}

.bws-toast::before {
    content: '♪';
    font-size: 14px;
}

@keyframes bws-toast-in {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes bws-toast-out {
    from { opacity: 1; }
    to   { opacity: 0; }
}

@media (max-width: 600px) {
    #bws-topbar { padding: 12px 16px; }
    #bws-editor-wrap { padding: 30px 16px 80px; }
    #bws-editor { font-size: 16px; }
}
