/* ================================================================
   dashboard.css — Member Dashboard Styles
================================================================ */

/* Dashboard overrides the card max-width for wide layout */
/* Dashboard Layout Overrides: 100vw/100vh Full Screen */
body:has(.db-container) {
    /* removed overflow hidden to allow natural scroll */
}
body:has(.db-container) .page {
    padding: 0;
    max-width: 100vw;
    width: 100vw;
    width: 100vw;
    display: flex;
    flex-direction: column;
}
body:has(.db-container) .card {
    max-width: 100%;
    width: 100%;
    height: 100%;
    border-radius: 0;
    border: none;
    margin: 0;
    display: flex;
    flex-direction: column;
    background: transparent;
    box-shadow: none;
}
body:has(.db-container) .card-body {
    padding: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 0;
}
body:has(.db-container) .brand-footer {
    display: none;
}
.db-container {
    flex: 1;
    min-height: 0;
}
.db-content {
    flex: 1;
    min-height: 0;
    min-height: 0;
    padding-right: 16px;
}
.db-content::-webkit-scrollbar {
    width: 8px;
}
.db-content::-webkit-scrollbar-track {
    background: var(--surface);
    border-radius: 4px;
}
.db-content::-webkit-scrollbar-thumb {
    background: var(--surface-hover);
    border-radius: 4px;
}
.db-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Nav section labels */
.db-nav-label {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    padding: 12px 14px 4px;
    opacity: 0.6;
}

/* Pulsing status dot animation */
@keyframes db-pulse {
    0%   { transform: scale(0.9); opacity: 0.6; }
    50%  { transform: scale(1.25); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.6; }
}
.status-dot-pulse {
    animation: db-pulse 1.5s infinite;
}

/* ================================================================
   Content Engine — Framework Selector
================================================================ */
.ce-framework-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
    margin-bottom: 28px;
}
.ce-framework-card {
    background: rgba(255,255,255,0.025);
    border: 1.5px solid var(--line);
    border-radius: 14px;
    padding: 24px 20px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, transform 0.15s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    gap: 10px;
    user-select: none;
}
.ce-framework-card:hover {
    background: rgba(99,102,241,0.08);
    border-color: rgba(99,102,241,0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(0,0,0,0.2);
}
.ce-framework-card.selected {
    background: rgba(99,102,241,0.14);
    border-color: var(--indigo);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.2);
}
.ce-framework-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-size: 1.8rem;
    flex-shrink: 0;
}
.ce-framework-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}
.ce-framework-desc {
    font-size: 0.95rem;
    color: var(--muted);
    margin: 0;
    line-height: 1.4;
}
.ce-badge {
    display: inline-block;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    padding: 2px 7px;
    border-radius: 4px;
    background: rgba(99,102,241,0.2);
    color: #a5b4fc;
    border: 1px solid rgba(99,102,241,0.3);
    width: fit-content;
}
.ce-keyword-row {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}
.ce-keyword-row .field {
    flex: 1;
    margin: 0;
}
.ce-generate-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border: none;
    color: var(--text);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    padding: 13px 24px;
    border-radius: 10px;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}
.ce-generate-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99,102,241,0.4);
}
.ce-coming-soon-banner {
    background: linear-gradient(135deg, rgba(99,102,241,0.08), rgba(139,92,246,0.06));
    border: 1.5px dashed rgba(99,102,241,0.35);
    border-radius: 14px;
    padding: 32px;
    text-align: center;
    margin-top: 24px;
}

/* ================================================================
   Manual Publish — Full WordPress Editor
================================================================ */
.pub-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}
.pub-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.pub-sidebar {
    width: 280px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Title input */
.pub-title-input {
    width: 100%;
    background: var(--surface);
    border: 1.5px solid var(--line);
    border-radius: 10px;
    padding: 14px 18px;
    font-family: inherit;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.pub-title-input::placeholder { color: var(--border); }
.pub-title-input:focus { border-color: var(--indigo); }

/* Editor toolbar */
.pub-toolbar {
    background: var(--surface);
    border: 1px solid var(--line);
    border-bottom: none;
    border-radius: 10px 10px 0 0;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 2px;
    flex-wrap: wrap;
}
.pub-toolbar-sep {
    width: 1px;
    height: 20px;
    background: var(--line);
    margin: 0 6px;
    flex-shrink: 0;
}
.pub-tb-btn {
    background: none;
    border: none;
    color: var(--muted);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    padding: 5px 9px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    line-height: 1;
}
.pub-tb-btn:hover, .pub-tb-btn.active {
    background: var(--surface-hover);
    color: var(--text);
}
.pub-tb-btn svg { width: 14px; height: 14px; flex-shrink: 0; }
.pub-tb-select {
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--muted);
    font-family: inherit;
    font-size: 1rem;
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    outline: none;
}
.pub-tb-select:focus { border-color: var(--indigo); color: var(--text); }

/* The editable content area */
.pub-editor-body {
    background: rgba(255,255,255,0.025);
    border: 1.5px solid var(--line);
    border-radius: 0 0 10px 10px;
    min-height: 340px;
    padding: 20px;
    outline: none;
    color: #e2e8f0;
    font-size: 1.15rem;
    line-height: 1.75;
    font-family: 'Hind Siliguri', sans-serif;
    transition: border-color 0.2s;
}
.pub-editor-body:focus { border-color: var(--indigo); }
.pub-editor-body p { margin: 0 0 1em; }
.pub-editor-body h1, .pub-editor-body h2, .pub-editor-body h3 {
    color: var(--text); margin: 1em 0 0.5em;
}
.pub-editor-body a { color: var(--cyan); }
.pub-editor-body blockquote {
    border-left: 3px solid var(--indigo);
    margin: 0 0 1em 0;
    padding-left: 16px;
    color: var(--muted);
    font-style: italic;
}
.pub-editor-body code, .pub-editor-body pre {
    background: rgba(0,0,0,0.3);
    border-radius: 5px;
    font-family: monospace;
    font-size: 0.88em;
    padding: 2px 6px;
}
.pub-editor-body ul, .pub-editor-body ol { padding-left: 24px; margin-bottom: 1em; }
.pub-editor-body[data-placeholder]:empty:before {
    content: attr(data-placeholder);
    color: rgba(255,255,255,0.18);
    pointer-events: none;
}

/* Word / char count bar */
.pub-count-bar {
    display: flex;
    gap: 16px;
    align-items: center;
    font-size: 0.95rem;
    color: var(--muted);
    padding: 4px 4px 0;
}
.pub-count-bar span { font-weight: 600; color: #a5b4fc; }

/* Sidebar panels */
.pub-panel {
    background: rgba(255,255,255,0.025);
    border: 1.5px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
}
.pub-panel-header {
    padding: 12px 16px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--line);
    background: var(--surface);
    display: flex;
    align-items: center;
    gap: 8px;
}
.pub-panel-body {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.pub-panel-body label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 4px;
    display: block;
}
.pub-panel-body input[type="text"],
.pub-panel-body input[type="datetime-local"],
.pub-panel-body select,
.pub-panel-body textarea {
    width: 100%;
    background: var(--surface);
    border: 1.5px solid var(--line);
    border-radius: 8px;
    padding: 9px 12px;
    font-family: inherit;
    font-size: 1.05rem;
    color: #e2e8f0;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s;
}
.pub-panel-body input:focus,
.pub-panel-body select:focus,
.pub-panel-body textarea:focus { border-color: var(--indigo); }
.pub-panel-body textarea { resize: vertical; min-height: 70px; line-height: 1.5; }
.pub-panel-body select option { background: #1e1e2e; }

/* Tag pill input */
.tag-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px;
    background: var(--surface);
    border: 1.5px solid var(--line);
    border-radius: 8px;
    min-height: 42px;
    cursor: text;
    transition: border-color 0.2s;
}
.tag-pills:focus-within { border-color: var(--indigo); }
.tag-pill {
    background: rgba(99,102,241,0.2);
    border: 1px solid rgba(99,102,241,0.4);
    color: #a5b4fc;
    border-radius: 5px;
    padding: 2px 8px 2px 9px;
    font-size: 0.95rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.tag-pill-remove {
    background: none;
    border: none;
    color: #a5b4fc;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    font-size: 1rem;
    opacity: 0.6;
    transition: opacity 0.15s;
}
.tag-pill-remove:hover { opacity: 1; }
.tag-input-ghost {
    background: none;
    border: none;
    outline: none;
    color: #e2e8f0;
    font-family: inherit;
    font-size: 1rem;
    min-width: 80px;
    flex: 1;
}

/* Featured image drop area */
.pub-image-drop {
    border: 1.5px dashed var(--line);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    font-size: 1rem;
    color: var(--muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}
.pub-image-drop:hover {
    border-color: var(--indigo);
    background: rgba(99,102,241,0.06);
    color: #c7d2fe;
}
.pub-image-drop svg { width: 24px; height: 24px; opacity: 0.5; }
.pub-image-drop strong { color: #c7d2fe; font-weight: 700; }
#pub-feat-preview {
    width: 100%;
    border-radius: 8px;
    object-fit: cover;
    max-height: 120px;
    display: none;
    border: 1px solid var(--line);
}

/* Publish action bar */
.pub-action-bar {
    display: flex;
    gap: 10px;
    flex-direction: column;
}
.pub-btn-publish {
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    color: var(--text);
    font-family: inherit;
    font-size: 1.15rem;
    font-weight: 700;
    padding: 16px 20px;
    border-radius: 10px;
    cursor: pointer;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: opacity 0.2s, transform 0.15s;
}
.pub-btn-publish:hover { opacity: 0.9; transform: translateY(-1px); }
.pub-btn-schedule {
    background: rgba(99,102,241,0.15);
    border: 1.5px solid rgba(99,102,241,0.4);
    color: #a5b4fc;
    font-family: inherit;
    font-size: 1.15rem;
    font-weight: 700;
    padding: 12px 16px;
    border-radius: 10px;
    cursor: pointer;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s, border-color 0.2s;
}
.pub-btn-schedule:hover {
    background: rgba(99,102,241,0.25);
    border-color: var(--indigo);
}
.pub-btn-draft {
    background: none;
    border: 1.5px solid var(--line);
    color: var(--muted);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    padding: 10px 16px;
    border-radius: 10px;
    cursor: pointer;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s, color 0.2s;
}
.pub-btn-draft:hover { background: var(--surface); color: var(--text); }

/* Schedule datetime toggle */
.pub-schedule-row {
    display: none;
    flex-direction: column;
    gap: 6px;
}
.pub-schedule-row.visible { display: flex; }

/* SEO score mini bar */
.seo-score-bar {
    height: 6px;
    background: var(--line);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 4px;
}
.seo-score-fill {
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, #10b981, #6ee7b7);
    transition: width 0.4s ease;
}

/* Focus mode toggle */
.pub-focus-toggle {
    position: fixed;
    bottom: 28px;
    right: 32px;
    background: rgba(30,30,50,0.9);
    border: 1px solid var(--line);
    border-radius: 50px;
    padding: 8px 16px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--muted);
    cursor: pointer;
    display: none;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
    backdrop-filter: blur(10px);
    z-index: 50;
}
.pub-focus-toggle:hover { color: var(--text); }
body:has(#tab-content-publish:not([style*="none"])) .pub-focus-toggle {
    display: inline-flex;
}

/* ================================================================
   Responsive
================================================================ */
@media (max-width: 1024px) {
    .pub-layout { flex-direction: column; }
    .pub-sidebar { width: 100%; }
    .pub-action-bar { flex-direction: row; flex-wrap: wrap; }
    .pub-btn-publish, .pub-btn-schedule, .pub-btn-draft { flex: 1; }
}

@media (max-width: 768px) {
    .db-container { flex-direction: column !important; }
    .db-sidebar {
        width: 100% !important;
        border-right: none !important;
        border-bottom: 1px solid var(--line) !important;
        padding-right: 0 !important;
        padding-bottom: 20px !important;
        margin-bottom: 10px !important;
    }
    .db-sidebar > div {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: 100% !important;
        gap: 12px;
    }
    .db-sidebar nav {
        flex-direction: row !important;
        gap: 8px !important;
        flex-wrap: wrap;
    }
    .db-sidebar div:first-child {
        border-bottom: none !important;
        padding-bottom: 0 !important;
    }
    .ce-framework-grid {
        grid-template-columns: 1fr 1fr;
    }
    .pub-toolbar { gap: 1px; }
}

@media (max-width: 560px) {
    .db-sidebar > div {
        flex-direction: column !important;
        align-items: stretch !important;
    }
    .db-sidebar nav {
        flex-direction: column !important;
        width: 100%;
    }
    .ce-framework-grid { grid-template-columns: 1fr; }
    .pub-action-bar { flex-direction: column; }
    .pub-btn-publish, .pub-btn-schedule, .pub-btn-draft { flex: unset; }
}
