/* content-dashboard.css - simple clean layout */
.content-dashboard{display:flex;gap:24px;padding:22px;font-family:Arial,Helvetica,sans-serif}
.content-left{width:320px;min-width:260px}
.content-main{flex:1;background:#f3f7ff;padding:22px;border-radius:8px;min-height:520px;box-shadow:0 1px 0 rgba(0,0,0,0.02)}
.content-btn{background:#2271b1;color:#fff;border:none;padding:10px 14px;border-radius:6px;cursor:pointer}
.content-list{margin-top:12px;background:#fff;padding:10px;border-radius:8px;box-shadow:0 4px 18px rgba(20,35,60,0.04);max-height:78vh;overflow:auto}
.content-item{padding:12px;border-bottom:1px solid #f1f1f1;display:flex;justify-content:space-between;align-items:center}
.content-item h4{margin:0;font-size:14px;color:#123}
.content-item .muted{font-size:12px;color:#718096}
.content-form-wrap{background:#fff;padding:18px;border-radius:8px;box-shadow:0 6px 26px rgba(20,35,60,0.04)}
.content-form-wrap.hidden{display:none}
.content-form-wrap label{display:block;margin-bottom:6px;font-weight:600;font-size:13px}
.content-form-wrap input[type="text"], .content-form-wrap textarea{width:100%;padding:10px;border:1px solid #e6eef9;border-radius:6px;margin-bottom:12px}
.content-form-actions{display:flex;gap:12px;align-items:center}
.content-delete{background:#d9534f;color:#fff;border:none;padding:8px 12px;border-radius:6px;cursor:pointer}
.content-note{position:fixed;right:20px;top:20px;background:#222;color:#fff;padding:10px 14px;border-radius:6px;z-index:9999;opacity:0.95}
.placeholder{color:#6b7280}
@media (max-width:900px){
  .content-dashboard{flex-direction:column}
  .content-left{width:100%}
}

/* Single-column 3-row layout for Content Management dashboard */
.cm-dashboard.cm-single-column {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

/* rows */
.cm-row { width: 100%; display: block; }

/* Top row: keep New Post button left, reserve right for future controls */
.cm-row-top {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
}

/* View area: larger card */
.cm-row-view { display:block; }
.content-view.card,
.content-form-wrap.card {
  background: #f7fbff;
  border-radius: 8px;
  padding: 18px;
  box-shadow: 0 6px 22px rgba(20,35,60,0.04);
  min-height: 220px;
}

/* Posts list card */
.cm-row-list { display:block; }
.content-list.card {
  background: #fff;
  border-radius: 8px;
  padding: 10px;
  box-shadow: 0 6px 22px rgba(20,35,60,0.04);
  max-height: 320px;
  overflow:auto;
}

/* Individual list items */
.content-item {
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:10px;
  border-bottom:1px solid #f1f5f9;
}
.content-item h4 { margin:0; font-size:14px; }
.content-item .muted { font-size:12px; color:#6b7280; }

/* New Post button styling */
.content-btn {
  background:#2271b1;
  color:#fff;
  border:none;
  padding:10px 14px;
  border-radius:6px;
  cursor:pointer;
  font-weight:600;
}
.content-btn.alt { background:#9aa4b2; }

/* Delete button */
.content-delete { background:#d9534f; color:#fff; border:none; padding:8px 12px; border-radius:6px; cursor:pointer; }

/* small helper styles */
.placeholder { color:#64748b; font-size:14px; }

/* responsive: keep stacked layout on small screens */
@media (max-width:900px) {
  .cm-dashboard.cm-single-column { padding:12px; gap:12px; }
  .content-view.card, .content-form-wrap.card { min-height:180px; }
  .content-list.card { max-height:240px; }
}

.cm-list { display:flex; flex-direction:column; gap:12px; }
.cm-item { display:flex; gap:12px; padding:12px; border-radius:6px; background:#fff; box-shadow:0 1px 4px rgba(0,0,0,.05); align-items:center; }
.cm-thumb img { width:100px; height:70px; object-fit:cover; border-radius:6px; }
.cm-excerpt { color:#666; font-size:14px; }

.cm-notify {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 18px;
    border-radius: 6px;
    z-index: 9999;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.cm-notify.cm-success {
    background: #10b981;
    color: white;
}

.cm-notify.cm-error {
    background: #ef4444;
    color: white;
}

/* Public Feed Styles */
.cm-public-feed {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.cm-feed-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 2px solid #e5e7eb;
}

.cm-public-item {
    background: #fff;
    border: 1px solid #e5e7eb;
    margin-bottom: 20px;
    transition: box-shadow 0.3s ease;
}

.cm-public-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

@media (max-width: 768px) {
    .cm-feed-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .cm-public-feed {
        padding: 15px;
    }
}

/* Quill Editor Styles */
#quill-editor {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

.ql-toolbar.ql-snow {
    border: 1px solid #ddd;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    background: #f9fafb;
}

.ql-container.ql-snow {
    border: 1px solid #ddd;
    border-radius: 0 0 4px 4px;
    font-size: 14px;
}

.ql-editor {
    min-height: 200px;
    max-height: 400px;
    overflow-y: auto;
}

.ql-editor.ql-blank::before {
    color: #aaa;
    font-style: normal;
}

/* Quill toolbar button hover */
.ql-snow .ql-stroke {
    stroke: #444;
}

.ql-snow .ql-fill {
    fill: #444;
}

.ql-snow .ql-picker-label {
    color: #444;
}

.ql-toolbar.ql-snow .ql-picker-label:hover,
.ql-toolbar.ql-snow .ql-picker-item:hover {
    color: #2271b1;
}

.ql-toolbar.ql-snow button:hover .ql-stroke,
.ql-toolbar.ql-snow button:focus .ql-stroke {
    stroke: #2271b1;
}

/* Rich Text Content Display Styles */
.content-post-body h1,
.content-post-body h2,
.content-post-body h3 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    font-weight: 600;
    line-height: 1.3;
}

.content-post-body h1 { font-size: 2em; }
.content-post-body h2 { font-size: 1.5em; }
.content-post-body h3 { font-size: 1.25em; }

.content-post-body p {
    margin-bottom: 1em;
}

.content-post-body strong {
    font-weight: 600;
}

.content-post-body em {
    font-style: italic;
}

.content-post-body u {
    text-decoration: underline;
}

.content-post-body s {
    text-decoration: line-through;
}

.content-post-body ol,
.content-post-body ul {
    margin-left: 2em;
    margin-bottom: 1em;
}

.content-post-body ol {
    list-style-type: decimal;
}

.content-post-body ul {
    list-style-type: disc;
}

.content-post-body li {
    margin-bottom: 0.5em;
}

.content-post-body a {
    color: #2271b1;
    text-decoration: underline;
}

.content-post-body a:hover {
    color: #135e96;
}

.content-post-body img {
    max-width: 100%;
    height: auto;
    margin: 1em 0;
    border-radius: 4px;
}

.content-post-body .ql-align-center {
    text-align: center;
}

.content-post-body .ql-align-right {
    text-align: right;
}

.content-post-body .ql-align-justify {
    text-align: justify;
}

/* CRITICAL: Single Post Page Layout - 15% left (ads), 75% content, 10% right (ads) */
body.single-content_post .site-main,
body.single-content_post .content-area {
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

body.single-content_post .entry-content {
    margin-left: 15% !important;
    margin-right: 10% !important;
    width: 75% !important;
    max-width: 75% !important;
    padding: 20px !important;
    box-sizing: border-box !important;
}

/* Content wrapper for single posts */
body.single-content_post .content-post-wrapper,
body.single-content_post .content-interactions-wrapper {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

/* Ensure article element doesn't constrain width */
body.single-content_post article {
    max-width: 100% !important;
}

/* Mobile responsive - stack on small screens */
@media (max-width: 768px) {
    body.single-content_post .entry-content {
        margin-left: 5% !important;
        margin-right: 5% !important;
        width: 90% !important;
        max-width: 90% !important;
        padding: 15px !important;
    }
}

/* Ad placeholder areas (optional - for visual reference) */
body.single-content_post::before {
    content: '';
    position: fixed;
    left: 0;
    top: 0;
    width: 15%;
    height: 100%;
    background: transparent;
    pointer-events: none;
    z-index: -1;
}

body.single-content_post::after {
    content: '';
    position: fixed;
    right: 0;
    top: 0;
    width: 10%;
    height: 100%;
    background: transparent;
    pointer-events: none;
    z-index: -1;
}

/* content-dashboard.css - simple clean layout */
.content-dashboard{display:flex;gap:24px;padding:22px;font-family:Arial,Helvetica,sans-serif}
.content-left{width:320px;min-width:260px}
.content-main{flex:1;background:#f3f7ff;padding:22px;border-radius:8px;min-height:520px;box-shadow:0 1px 0 rgba(0,0,0,0.02)}
.content-btn{background:#2271b1;color:#fff;border:none;padding:10px 14px;border-radius:6px;cursor:pointer}
.content-list{margin-top:12px;background:#fff;padding:10px;border-radius:8px;box-shadow:0 4px 18px rgba(20,35,60,0.04);max-height:78vh;overflow:auto}
.content-item{padding:12px;border-bottom:1px solid #f1f1f1;display:flex;justify-content:space-between;align-items:center}
.content-item h4{margin:0;font-size:14px;color:#123}
.content-item .muted{font-size:12px;color:#718096}
.content-form-wrap{background:#fff;padding:18px;border-radius:8px;box-shadow:0 6px 26px rgba(20,35,60,0.04)}
.content-form-wrap.hidden{display:none}
.content-form-wrap label{display:block;margin-bottom:6px;font-weight:600;font-size:13px}
.content-form-wrap input[type="text"], .content-form-wrap textarea{width:100%;padding:10px;border:1px solid #e6eef9;border-radius:6px;margin-bottom:12px}
.content-form-actions{display:flex;gap:12px;align-items:center}
.content-delete{background:#d9534f;color:#fff;border:none;padding:8px 12px;border-radius:6px;cursor:pointer}
.content-note{position:fixed;right:20px;top:20px;background:#222;color:#fff;padding:10px 14px;border-radius:6px;z-index:9999;opacity:0.95}
.placeholder{color:#6b7280}
@media (max-width:900px){
  .content-dashboard{flex-direction:column}
  .content-left{width:100%}
}

/* Single-column 3-row layout for Content Management dashboard */
.cm-dashboard.cm-single-column {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

/* rows */
.cm-row { width: 100%; display: block; }

/* Top row: keep New Post button left, reserve right for future controls */
.cm-row-top {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
}

/* View area: larger card */
.cm-row-view { display:block; }
.content-view.card,
.content-form-wrap.card {
  background: #f7fbff;
  border-radius: 8px;
  padding: 18px;
  box-shadow: 0 6px 22px rgba(20,35,60,0.04);
  min-height: 220px;
}

/* Posts list card */
.cm-row-list { display:block; }
.content-list.card {
  background: #fff;
  border-radius: 8px;
  padding: 10px;
  box-shadow: 0 6px 22px rgba(20,35,60,0.04);
  max-height: 320px;
  overflow:auto;
}

/* Individual list items */
.content-item {
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:10px;
  border-bottom:1px solid #f1f5f9;
}
.content-item h4 { margin:0; font-size:14px; }
.content-item .muted { font-size:12px; color:#6b7280; }

/* New Post button styling */
.content-btn {
  background:#2271b1;
  color:#fff;
  border:none;
  padding:10px 14px;
  border-radius:6px;
  cursor:pointer;
  font-weight:600;
}
.content-btn.alt { background:#9aa4b2; }

/* Delete button */
.content-delete { background:#d9534f; color:#fff; border:none; padding:8px 12px; border-radius:6px; cursor:pointer; }

/* small helper styles */
.placeholder { color:#64748b; font-size:14px; }

/* responsive: keep stacked layout on small screens */
@media (max-width:900px) {
  .cm-dashboard.cm-single-column { padding:12px; gap:12px; }
  .content-view.card, .content-form-wrap.card { min-height:180px; }
  .content-list.card { max-height:240px; }
}

.cm-list { display:flex; flex-direction:column; gap:12px; }
.cm-item { display:flex; gap:12px; padding:12px; border-radius:6px; background:#fff; box-shadow:0 1px 4px rgba(0,0,0,.05); align-items:center; }
.cm-thumb img { width:100px; height:70px; object-fit:cover; border-radius:6px; }
.cm-excerpt { color:#666; font-size:14px; }

.cm-notify {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 18px;
    border-radius: 6px;
    z-index: 9999;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.cm-notify.cm-success {
    background: #10b981;
    color: white;
}

.cm-notify.cm-error {
    background: #ef4444;
    color: white;
}

/* Public Feed Styles */
.cm-public-feed {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.cm-feed-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 2px solid #e5e7eb;
}

.cm-public-item {
    background: #fff;
    border: 1px solid #e5e7eb;
    margin-bottom: 20px;
    transition: box-shadow 0.3s ease;
}

.cm-public-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

@media (max-width: 768px) {
    .cm-feed-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .cm-public-feed {
        padding: 15px;
    }
}

/* Quill Editor Styles */
#quill-editor {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

.ql-toolbar.ql-snow {
    border: 1px solid #ddd;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    background: #f9fafb;
}

.ql-container.ql-snow {
    border: 1px solid #ddd;
    border-radius: 0 0 4px 4px;
    font-size: 14px;
}

.ql-editor {
    min-height: 200px;
    max-height: 400px;
    overflow-y: auto;
}

.ql-editor.ql-blank::before {
    color: #aaa;
    font-style: normal;
}

/* Quill toolbar button hover */
.ql-snow .ql-stroke {
    stroke: #444;
}

.ql-snow .ql-fill {
    fill: #444;
}

.ql-snow .ql-picker-label {
    color: #444;
}

.ql-toolbar.ql-snow .ql-picker-label:hover,
.ql-toolbar.ql-snow .ql-picker-item:hover {
    color: #2271b1;
}

.ql-toolbar.ql-snow button:hover .ql-stroke,
.ql-toolbar.ql-snow button:focus .ql-stroke {
    stroke: #2271b1;
}

/* Rich Text Content Display Styles */
.content-post-body h1,
.content-post-body h2,
.content-post-body h3 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    font-weight: 600;
    line-height: 1.3;
}

.content-post-body h1 { font-size: 2em; }
.content-post-body h2 { font-size: 1.5em; }
.content-post-body h3 { font-size: 1.25em; }

.content-post-body p {
    margin-bottom: 1em;
}

.content-post-body strong {
    font-weight: 600;
}

.content-post-body em {
    font-style: italic;
}

.content-post-body u {
    text-decoration: underline;
}

.content-post-body s {
    text-decoration: line-through;
}

.content-post-body ol,
.content-post-body ul {
    margin-left: 2em;
    margin-bottom: 1em;
}

.content-post-body ol {
    list-style-type: decimal;
}

.content-post-body ul {
    list-style-type: disc;
}

.content-post-body li {
    margin-bottom: 0.5em;
}

.content-post-body a {
    color: #2271b1;
    text-decoration: underline;
}

.content-post-body a:hover {
    color: #135e96;
}

.content-post-body img {
    max-width: 100%;
    height: auto;
    margin: 1em 0;
    border-radius: 4px;
}

.content-post-body .ql-align-center {
    text-align: center;
}

.content-post-body .ql-align-right {
    text-align: right;
}

.content-post-body .ql-align-justify {
    text-align: justify;
}

/* CRITICAL: Single Post Page Layout - Same as Public Feed (centered, max-width 900px) */
body.single-content_post .site-main,
body.single-content_post .content-area {
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

body.single-content_post .entry-content {
    max-width: 900px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 20px !important;
    box-sizing: border-box !important;
}

/* Content wrapper for single posts - match public feed style */
body.single-content_post .content-post-wrapper,
body.single-content_post .content-interactions-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

/* Ensure article element doesn't constrain width */
body.single-content_post article {
    max-width: 100% !important;
}

/* Single post title styling */
body.single-content_post .entry-title {
    font-size: 2.5em;
    margin-bottom: 0.5em;
}

/* Mobile responsive - same as public feed */
@media (max-width: 768px) {
    body.single-content_post .entry-content {
        max-width: 100% !important;
        padding: 15px !important;
    }
    
    body.single-content_post .content-post-wrapper,
    body.single-content_post .content-interactions-wrapper {
        padding: 15px;
    }
}

/* ========================================
   HIDE CHAT WIDGET ON CONTENT POST PAGES
   ======================================== */

/* Hide chat widget on single content_post pages */
body.single-content_post #chat-widget,
body.single-content_post .chat-widget,
body.single-content_post [class*="chat"],
body.single-content_post [id*="chat"],
body.single-content_post .tidio-chat,
body.single-content_post #tidio-chat,
body.single-content_post .tawk-widget,
body.single-content_post #tawk-widget,
body.single-content_post .crisp-client,
body.single-content_post .intercom-app,
body.single-content_post #intercom-container,
body.single-content_post .drift-frame-controller,
body.single-content_post #drift-widget,
body.single-content_post .freshchat-widget,
body.single-content_post #fc_frame,
body.single-content_post .zendesk-widget,
body.single-content_post #launcher {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* Hide chat widget on pages with our shortcodes */
.cm-public-feed ~ * [class*="chat"],
.cm-public-feed ~ * [id*="chat"],
.content-single-post-shortcode ~ * [class*="chat"],
.content-single-post-shortcode ~ * [id*="chat"] {
    display: none !important;
    visibility: hidden !important;
}

/* Target common chat widget selectors more specifically */
body.page #chat-widget,
body.page .chat-widget,
body.page [class*="chat-bubble"],
body.page [id*="chat-bubble"],
body.page .widget-chat,
body.page #widget-chat {
    display: none !important;
}

/* If chat widget is in an iframe */
body.single-content_post iframe[src*="chat"],
body.single-content_post iframe[src*="tawk"],
body.single-content_post iframe[src*="crisp"],
body.single-content_post iframe[src*="intercom"],
body.single-content_post iframe[src*="drift"],
body.single-content_post iframe[src*="zendesk"],
body.single-content_post iframe[title*="chat" i],
body.page iframe[src*="chat"],
body.page iframe[title*="chat" i] {
    display: none !important;
}