/* ========== Custom classes for posts-posts-list section ========== */

.posts-list-title {
    display: block;
    width: 100%;
    text-align: center;
    font-size: 2em;
    font-weight: 800;
    letter-spacing: 1.2px;
    padding: 0.8em 1em;
    margin: 0.7rem 0;
    background: #a05a2c; /* Rich brown from theme, no gradient */
    color: #fff;
    border-radius: 16px;
    box-shadow:
        0 6px 24px rgba(160, 90, 44, 0.18),
        0 1.5px 0 #F7D36A inset,
        0 1px 6px rgba(0,0,0,0.08);
    text-shadow: 0 2px 8px rgba(160,90,44,0.12), 0 1px 0 #F7D36A;
    border: 2px solid #F7D36A;
    font-family: 'Montserrat', 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
    letter-spacing: 2px;
    transition: box-shadow 0.2s, background 0.2s;
}

/* Optional: Add a subtle pattern overlay for more texture */
.posts-list-title::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23fff' fill-opacity='0.04' fill-rule='evenodd'%3E%3Ccircle cx='3' cy='3' r='3'/%3E%3Ccircle cx='13' cy='13' r='3'/%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
    border-radius: 16px;
}

/* Column 2 (main content) */
.program-col-2 {
    display: flex;
    justify-content: center;
    min-width: 0;
    overflow-x: hidden;
    box-sizing: border-box;
}

.main-posts {
    background: #fff;
    padding: 0 1.5rem 1.2rem 1.5rem;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem auto;
    max-width: 800px;
    box-sizing: border-box;
    overflow-x: hidden;
    box-shadow: none;
}

.posts-single-post.posts-form + #posts-editor {
    margin-top: 1rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Utility and semantic classes (combined) */
.posts-form {
    margin-top: 1rem;
}

.post-attachment, .posts-attachment-margin {
    margin: 0;
}

.posts-attachment-hide {
    display: none ;
}
.posts-content-view-margin {
    margin-left: 8px ;
    margin-top: 0.5em ;
}
.posts-date-posted-style {
    font-size: 0.95em ;
    color: #888 ;
    margin-left: 0 ;
    margin-top: 0.2em ;
}
.posts-edit-form-margin {
    margin-top: 1em ;
}
.posts-inline-media-upload-row-style,
.posts-inline-media-upload-row {
    justify-content: center ;
    width: 100% ;
    background: #fffbe9;
}
.posts-inline-upload-box-center,
.posts-inline-upload-box {
    margin: 0 auto ;
}
.posts-inline-upload-box-hide {
    display: none ;
}
.posts-inline-media-style,
.posts-inline-media {
    position: relative ;
    display: block ;
    margin: 0 auto ;
}
.posts-img-center,
.posts-media-img,
.posts-media-video {
    display: block ;
    max-width: 100% ;
    margin: 0 auto ;
}
.posts-download-link-center,
.posts-media-download {
    display: block ;
    text-align: center ;
    margin-top: 0.5rem;
    color: #EA543C;
    font-weight: 600;
    text-decoration: underline;
}
.posts-file-input-hide {
    display: none ;
}
/* Toolbar type select label */
.posts-toolbar-type-select label {
    margin: 0 6px 0 0;
    font-weight: 600;
    color: #7A4B2D;
}

/* Cancel link in form */
.posts-form a {
    margin-left: 1em;
    color: #EA543C;
    text-decoration: underline;
}

/* Edit attachment media sizing */
.posts-attachment.edit-attachment img,
.posts-attachment.edit-attachment video {
    max-width: 180px;
    display: block;
}

.posts-single-post {
    width: 100%; /* fill the column */
    max-width: 800px; /* optional */
    background: #fff;
    box-shadow: 0 1px 8px rgba(60,60,60,0.15);
    padding: 1.5rem 2rem 1.2rem 2rem;
    position: relative;
    box-sizing: border-box;
    margin: 0 0 0.8rem 0; /* add vertical gap between posts */
    display: block;
}

.posts-single-post.editing {
    border-radius: 8px;
    background: #fffbe9;
    box-shadow:
        0 4px 24px 0 rgba(234, 84, 60, 0.10), /* soft shadow */
        0 0 0 2.5px #F7D36A, /* outer highlight */
        0 1.5px 0 #fff inset, /* subtle inner highlight */
        0 -2px 8px 0 rgba(60,60,60,0.10) inset; /* inner shadow */
    margin-left: auto;
    margin-right: auto;
    transition: box-shadow 0.18s, background 0.18s;
}

/* =====================
   Shared Posts Form Styles
   ===================== */
.posts-form {
    width: 100%; /* fill the column */
    max-width: 800px; /* optional */
    background: #fff;
    box-shadow: 0 2px 12px rgba(60,60,60,0.2);
    padding: 1rem 2rem 1rem 2rem;
    margin-bottom: 10px;
    flex-direction: column;
    align-items: stretch;
    box-sizing: border-box;
    font-family: 'Open Sans', Arial, sans-serif;
}
.posts-form h3 {
    color: #EA543C;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.7rem;
    text-align: center;
}
.posts-form label {
    font-weight: 600;
    color: #7A4B2D;
    margin-bottom: 0.3rem;
    display: block;
}
.posts-form select,
.posts-form input[type="file"],
.posts-form input[type="text"],
.posts-form textarea {
    width: 100%;
    padding: 0.3rem 0.5rem;
    border: 1.5px solid #ccd0d5;
    border-radius: 6px;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    background: #fffbe9;
    color: #222;
    font-family: 'Open Sans', Arial, sans-serif;
    transition: border-color 0.18s, box-shadow 0.18s;
}
.posts-form select:focus,
.posts-form input[type="file"]:focus,
.posts-form input[type="text"]:focus,
.posts-form textarea:focus {
    border-color: #F7D36A;
    outline: none;
    box-shadow: 0 0 0 2px #F7D36A33;
}
.posts-form button[type="submit"] {
    background: #a05a2c;
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    border: 1.5px solid #a05a2c;
    border-radius: 6px;
    padding: 0.3rem 1.5rem;
    height: 28px;
    margin-top: 0;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(60,60,60,0.08);
    transition: background 0.18s, color 0.18s, border-color 0.18s;
}
.posts-form button[type="submit"]:hover {
    background: #7a4b2d;
    border-color: #7a4b2d;
    color: #fff;
}

.posts-edit-mode.posts-form {
    width: 100%;
    background: #fffbe9;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    box-sizing: border-box;
    gap: 0.4rem;
}
.posts-edit-mode.posts-form button[type="submit"],
.posts-edit-mode.posts-form .posts-inline-cancel-btn {
    height: 28px;
    width: 60px;
    min-width: 60px;
    max-width: 60px;
    display: inline-block;
    margin-top: 0.7rem;
    margin-right: 0;
    padding: 0;
    font-size: 1rem;
}
.posts-edit-mode.posts-form .posts-inline-cancel-btn {
    background: #fff ;
    color: #a05a2c;
    border: 1.5px solid #bbb;
    border-radius: 6px ;
    box-shadow: none;
    transition: background 0.18s, color 0.18s, border-color 0.18s;
    margin-left: 6px;
    cursor: pointer;
}
.posts-edit-mode.posts-form .posts-inline-cancel-btn:hover {
    background: #f3f3f3 ;
    color: #7a4b2d;
    border-color: #a05a2c;
}

/* =====================
   Editor & Inline Editor
   ===================== */
#posts-editor, .posts-inline-editor {
    width: 100%;
    min-height: 100px;
    max-height: 220px;
    border: 1.5px solid #ccd0d5;
    border-radius: 6px;
    padding: 0.7rem 1rem;
    background: #fff;
    color: #222;
    font-family: 'Segoe UI','Open Sans',Arial,sans-serif;
    font-size: 11pt;
    resize: vertical;
    overflow-y: auto;
    margin-bottom: 0.5rem;
    box-shadow: none;
    outline: none;
    transition: border-color 0.18s, box-shadow 0.18s;
    z-index: 1;
    position: static;
    cursor: text;
}

/* =====================
   Media & Uploads
   ===================== */
.posts-inline-media-upload-row {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 140px;
    gap: 1rem;
    background: #fffbe9;
    box-shadow: 0 2px 10px rgba(60,60,60,0.10);
    border-radius: 2px;
    padding: 0;
    width: 100%;
    box-sizing: border-box;
}
.posts-inline-upload-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border: 2px dashed #a05a2c;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    position: relative;
    transition: border-color 0.18s, background 0.18s;
}
.posts-inline-upload-box:hover, .posts-inline-upload-box.has-file {
    border-color: #a05a2c;
    background: #f3f3f3;
}
.posts-inline-upload-plus {
    font-size: 2.2rem;
    color: #EA543C;
    font-weight: bold;
    pointer-events: none;
    user-select: none;
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
}
.posts-inline-media-container {
    position: relative;
    display: inline-block;
    max-width: 800px;
}
.posts-inline-media {
    max-width: 800px;
    width: 100%;
    display: block;
    margin-bottom: 1rem;
    position: relative;
}
.posts-inline-remove-media {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #fff;
    color: #292727;
    border: 1.5px solid #a05a2c;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 1.3rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1;
    box-shadow: 0 2px 6px rgba(60,60,60,0.10);
    transition: background 0.15s, color 0.15s;
    opacity: 0.4;
    backdrop-filter: blur(1px);
}

/* =====================
   Toolbar & Font Size
   ===================== */
.posts-editor-toolbar {
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    justify-content: space-between;
}
.posts-toolbar-type-select {
    margin-left: auto;
    margin-right: 0;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.posts-toolbar-type-dropdown {
    font-size: 0.8rem;
    border: 1.5px solid #bbb;
    border-radius: 5px;
    background: #fff;
    color: #222;
    font-weight: 600;
    margin: 0 ;
    min-width: 110px;
    height: 32px;
    outline: none;
    transition: border-color 0.18s, box-shadow 0.18s;
    padding: 0 ;
}
.posts-toolbar-type-dropdown:focus {
    border-color: #a05a2c;
    box-shadow: 0 0 0 2px #a05a2c33;
    margin: 0;
}
.posts-editor-toolbar button {
    background: #fffbe9;
    border: 1.5px solid #534141;
    color: #7A4B2D;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 5px;
    width: 24px;
    height: 24px;
    padding: 0;
    margin-right: 0.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
    box-sizing: border-box;
}
.posts-editor-toolbar button.active,
.posts-editor-toolbar button.active:hover,
.posts-editor-toolbar button.active:focus {
    color: #fff;
    border-color: #EA543C;
    background: linear-gradient(180deg, #F7D36A 0%, #EA543C 100%);
    box-shadow:
        0 2px 8px 0 rgba(234,84,60,0.18),
        0 0 0 2.5px #F7D36A,
        0 1.5px 0 #fff inset,
        0 -2px 8px 0 rgba(60,60,60,0.10) inset,
        0 2px 8px 0 #EA543C inset;
    outline: none;
    text-shadow: 0 1px 2px #a05a2c, 0 0 2px #fffbe9;
    filter: drop-shadow(0 2px 2px #EA543C);
}
.posts-fontsize-select {
    position: relative;
    display: inline-block;
    margin-left: 0.1rem;
    margin-right: 0.25rem;
    user-select: none;
}
.posts-fontsize-trigger {
    background: #fffbe9;
    border: 1.5px solid #7A4B2D;
    color: #7A4B2D;
    font-size: 1.rem;
    font-weight: 600;
    border-radius: 5px;
    width: 38px;
    height: 24px;
    padding: 0;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-sizing: border-box;
}
.posts-fontsize-trigger.active {
    color: #fff;
    border-color: #EA543C;
    background: linear-gradient(180deg, #F7D36A 0%, #EA543C 100%);
    box-shadow:
        0 2px 8px 0 rgba(234,84,60,0.18),
        0 0 0 2.5px #F7D36A,
        0 1.5px 0 #fff inset,
        0 -2px 8px 0 rgba(60,60,60,0.10) inset,
        0 2px 8px 0 #EA543C inset;
    outline: none;
    text-shadow: 0 1px 2px #a05a2c, 0 0 2px #fffbe9;
    filter: drop-shadow(0 2px 2px #EA543C);
}
.posts-fontsize-options {
    display: none;
    position: absolute;
    left: 0;
    top: 110%;
    background: #fff;
    border: 1px solid #7A4B2D;
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(204, 171, 166, 0.2);
    z-index: 10;
    width: 32px;
    padding: 0.2rem 0;
    max-height: 8.2em; /* 6 options at ~1.3em each */
    overflow-y: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE 10+ */
}
.posts-fontsize-options::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}
.posts-fontsize-option {
    padding: 0.2rem 1.6rem 0.2rem 0.4rem;
    font-size: 1rem;
    color: #7A4B2D;
    cursor: pointer;
    border-radius: 2px;
    transition: background 0.12s;
}
.posts-fontsize-option:hover,
.posts-fontsize-option:focus {
    background: #F7D36A;
    color: #EA543C;
    outline: none;
}

/* =====================
   Options, Dots, and Utility
   ===================== */
.posts-post-options {
    position: absolute;
    top: 1.1rem;
    right: 1.1rem;
    z-index: 2;
}
.posts-options-btn {
    background: #f1f1f1;
    border: none;
    cursor: pointer;
    font-size: 2.1rem;
    color: #7A4B2D;
    padding: 0.18rem 0.7rem;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(60,60,60,0.10);
    transition: background 0.15s, box-shadow 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}
.posts-options-btn:hover, .posts-options-btn:focus {
    background: #ebeae7;
    box-shadow: 0 2px 12px rgba(234,84,60,0.10);
    outline: none;
}

.posts-options-btn:focus,
.posts-options-btn:active {
    outline: none ;
    box-shadow: none ;
}
.posts-dots {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    gap: 3px;
    margin: 0 auto;
    padding: 0;
}
.posts-dot-circle {
    width: 6px;
    height: 6px;
    background: #7A4B2D;
    border-radius: 50%;
    display: block;
    margin: 0;
}
.posts-options-menu {
    position: relative;
    display: inline-block;
    z-index: 1000;
}
.posts-options-dropdown {
    display: none;
    position: absolute;
    top: 2.2rem;
    right: 0;
    background: #fff;
    border: 1.5px solid #a05a2c;
    box-shadow: 0 2px 8px rgba(60,60,60,0.10);
    border-radius: 8px;
    min-width: 110px;
    z-index: 2000;
    padding: 0.3rem 0.2rem;
}
.posts-options-menu .show {
    display: block;
}
.posts-options-dropdown form {
    margin: 0;
    padding: 0;
    margin: 0.5rem 0;
}
.posts-options-dropdown button {
    width: 100%;
    background: none;
    border: none;
    color: #EA543C;
    font-weight: 600;
    font-size: 1rem;
    padding: 0.5rem 0.7rem;
    text-align: left;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.13s;
}
.posts-options-dropdown button:hover, .posts-options-dropdown button:focus {
    background: #F7D36A33;
    color: #7A4B2D;
}

/* =====================
   Miscellaneous & Utility
   ===================== */
.posts-content-view {
    margin: 0 ;
}
.posts-character-count,
.posts-inline-character-count {
    text-align: right;
    font-size: 0.95rem;
    color: #080808;
    margin-top: 0.3rem;
}
.posts-type-label {
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 0.5px;
    color: #7A4B2D;
    margin: 0 0 2px 0;
    display: inline-block;
}
.posts-attachment-name {
    margin-left: 12px;
    font-size: 0.98rem;
    color: #7A4B2D;
    vertical-align: middle;
    display: inline-block;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.posts-file-icon-label svg {
    vertical-align: middle;
    cursor: pointer;
}
.posts-attachment svg {
    height: 24px ;
    width: 24px ;
    display: inline-block;
    vertical-align: middle;
}
.posts-attachment {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 0.5rem 0;
}
.posts-attachment img,
.posts-attachment video {
    width: 100%;
    max-width: 800px;
    height: auto;
    display: block;
    border-radius: 0;
    box-shadow: none;
    margin: 20px 0 0 0;
}
.posts-attachment a {
    display: inline-block;
    margin: 0.5rem auto 0 auto;
    text-align: center;
}
.posts-form .posts-attachment {
    display: block;
    margin: 0 auto;
    text-align: center;
    max-width: 100%;
}

.posts-form .posts-attachment img,
.posts-form .posts-attachment video {
    display: block;
    margin: 0 auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(60,60,60,0.10);
}

.posts-form .posts-attachment a {
    display: inline-block;
    margin-top: 0.5rem;
    color: #EA543C;
    font-weight: 600;
    text-decoration: underline;
}

/* --- Semantic structure for posts list --- */
.posts-view-mode {
    /* Section for post view mode */
    width: 100%;
    padding: 0;
    margin: 0;
    background: none;
    border: none;
}
.posts-attachment figure,
figure.posts-attachment {
    margin: 0 auto 1rem auto;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    background: none;
    border: none;
}
.posts-media-img {
    display: block;
    max-width: 100%;
    margin: 0 auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(60,60,60,0.10);
}
.posts-media-video {
    display: block;
    max-width: 100%;
    margin: 0.5rem auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(60,60,60,0.10);
}
.posts-media-download {
    display: inline-block;
    margin-top: 0.5rem;
    color: #EA543C;
    font-weight: 600;
    text-decoration: underline;
    text-align: center;
}

/* =====================
   Cursor Utility
   ===================== */
.posts-inline-editor, #posts-editor {
    cursor: text;
}
button, .posts-form button, .posts-inline-btn-row button, .posts-options-btn, .posts-options-dropdown button, .posts-inline-remove-media, .posts-inline-upload-box {
    cursor: pointer;
}
.posts-inline-btn-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.7rem;
    margin-top: 0.7rem;
    margin-bottom: 0.2rem;
}