/**
 * ObitMaker Plugin Stylesheet
 * Public-facing and admin styles for ObitMaker obituary management plugin.
 */

.obitmaker-hidden {
    display: none;
}

/* ================================================================
   PUBLIC — OBITUARY DISPLAY
   ================================================================ */

.obitmaker-wrapper {
    text-align: left;
}

.obitmaker-section-hr {
    border: 0;
    border-top: 2px solid #666;
    margin: 16px 0;
}

.obit-photo {
    margin: 10px 0 20px 0;
    text-align: center;
}

/* ----------------------------------------------------------------
   Collapsible section toggles
   ---------------------------------------------------------------- */

.obitmaker-section-toggle {
    cursor: pointer;
    user-select: none;
}

.obitmaker-toggle-heading {
    cursor: pointer;
    user-select: none;
}

.obitmaker-toggle-heading-flex {
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.obitmaker-collapsible {
    display: none;
    overflow: hidden;
}

.obitmaker-collapsible-inner {
    padding-top: 8px;
}

/* ----------------------------------------------------------------
   Roll of Honour
   ---------------------------------------------------------------- */

.obitmaker-roll-of-honour {
    text-align: center;
}

.obit-roh-entry {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #666;
    text-align: center;
}

.obitmaker-roh-pagination {
    text-align: center;
    margin-top: 20px;
}

.obitmaker-roh-pagination .page-numbers {
    display: inline-block;
    margin: 0 3px;
    padding: 4px 8px;
}

.obitmaker-roh-pagination ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.obitmaker-roh-pagination ul li {
    display: inline-block;
    margin: 0 2px;
}

/* ----------------------------------------------------------------
   Book of Condolences — public
   ---------------------------------------------------------------- */

.obitmaker-boc-count {
    font-size: 14px;
    font-weight: normal;
    color: #666;
}

.obitmaker-leave-message-link {
    font-size: 13px;
    font-weight: normal;
    color: #615f8b;
    text-decoration: none;
    white-space: nowrap;
}

.obitmaker-leave-message-link:hover {
    text-decoration: underline;
    color: #615f8b;
}

.obitmaker-boc-success {
    background: #d1fae5;
    border: 1px solid #6ee7b7;
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 16px;
    color: #065f46;
}

.obitmaker-boc-error {
    background: #fee2e2;
    border: 1px solid #fca5a5;
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 16px;
    color: #991b1b;
}

.obitmaker-condolences-list {
    margin-bottom: 20px;
}

.obitmaker-condolence-entry {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 2px solid #444;
}

.obitmaker-condolence-entry-name {
    margin: 0 0 6px;
}

.obitmaker-condolence-entry-message {
    margin: 0;
}

.obitmaker-boc-pagination {
    margin-bottom: 20px;
    text-align: left;
}

.obitmaker-boc-pagination a {
    text-decoration: none;
}

.obitmaker-boc-empty {
    color: #666;
    margin-bottom: 16px;
}

.obitmaker-boc-form-wrap {
    border-top: 1px solid #ddd;
    padding-top: 16px;
    margin-bottom: 20px;
}

.obitmaker-boc-form-wrap h4 {
    margin: 0 0 12px;
}

.obitmaker-boc-honeypot {
    display: none;
}

.obitmaker-boc-input {
    width: 100%;
    max-width: 400px;
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
}

.obitmaker-boc-textarea {
    width: 100%;
    max-width: 500px;
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
}

.obitmaker-boc-number {
    width: 80px;
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
}

.obitmaker-boc-charcount {
    color: #666;
}

.obitmaker-boc-submit {
    background: #615f8b;
    color: #fff;
    padding: 8px 20px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
}

.obitmaker-boc-submit:hover {
    background: #4e4c72;
}

.obitmaker-boc-cancel {
    margin-left: 12px;
    font-size: 13px;
    color: #615f8b;
    text-decoration: none;
}

.obitmaker-boc-cancel:hover {
    text-decoration: underline;
}

/* ================================================================
   ADMIN — META BOX
   ================================================================ */

.obitmaker-meta-th {
    width: 200px;
}

.obitmaker-meta-input-full {
    width: 100%;
    max-width: 500px;
}

.obitmaker-required-star {
    color: red;
}

.obitmaker-meta-textarea {
    width: 100%;
    height: 120px;
}

.obitmaker-meta-textarea-large {
    width: 100%;
    height: 200px;
}

.obitmaker-meta-number {
    width: 200px;
}

.obitmaker-meta-date {
    width: 250px;
}

.obitmaker-meta-text {
    width: 100%;
}

.obitmaker-meta-table {
    max-width: 900px;
}

.obitmaker-meta-hint {
    font-weight: normal;
    color: #666;
    font-size: 11px;
}

.obitmaker-meta-hidden-note {
    color: #999;
    font-size: 12px;
}

.obitmaker-shortcode-input {
    width: 100%;
    font-size: 11px;
}

/* ================================================================
   ADMIN — CONDOLENCES PAGE
   ================================================================ */

.obitmaker-pending-badge {
    background: #d63638;
    color: #fff;
    border-radius: 10px;
    padding: 2px 8px;
    font-size: 13px;
    margin-left: 8px;
}

.obitmaker-admin-table {
    max-width: 1100px;
}

.obitmaker-admin-form-table {
    max-width: 700px;
}

.obitmaker-admin-input-full {
    width: 100%;
}

.obitmaker-admin-textarea {
    width: 100%;
    height: 150px;
}

.obitmaker-search-form {
    margin-bottom: 16px;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.obitmaker-search-input {
    width: 280px;
}

.obitmaker-export-form {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.obitmaker-export-hint {
    color: #666;
    font-size: 12px;
}

.obitmaker-status-approved {
    color: #166534;
    font-weight: bold;
}

.obitmaker-status-pending {
    color: #b32d2e;
    font-weight: bold;
}

.obitmaker-action-approve {
    color: #166534;
}

.obitmaker-action-delete {
    color: #b32d2e;
}

.obitmaker-inline-form {
    display: inline;
}

.obitmaker-col-id        { width: 50px; }
.obitmaker-col-obituary  { width: 180px; }
.obitmaker-col-name      { width: 130px; }
.obitmaker-col-status    { width: 80px; }
.obitmaker-col-submitted { width: 140px; }
.obitmaker-col-actions   { width: 180px; }

/* ================================================================
   ADMIN — EXPORT PAGE
   ================================================================ */

.obitmaker-export-section-table {
    max-width: 600px;
    margin-bottom: 20px;
}

.obitmaker-export-checkbox-col {
    width: 80px;
}

.obitmaker-export-checkbox-cell {
    text-align: center;
}

.obitmaker-toggle-all-link {
    font-size: 12px;
    font-weight: normal;
    margin-left: 12px;
}

.obitmaker-options-table {
    max-width: 600px;
    margin-bottom: 20px;
}

.obitmaker-options-checkbox-col {
    width: 40px;
    text-align: center;
}

.obitmaker-admin-field-table {
    max-width: 900px;
}

.obitmaker-fs-col-order    { width: 80px; }
.obitmaker-fs-col-type     { width: 110px; }
.obitmaker-fs-col-required { width: 80px; }
.obitmaker-fs-col-legacy   { width: 130px; }
.obitmaker-fs-col-zone     { width: 180px; }

.obitmaker-fs-center {
    text-align: center;
}


.obitmaker-fs-input-full {
    width: 100%;
}

.obitmaker-fs-key-readonly {
    width: 100%;
    background: #f0f0f0;
    color: #666;
}

.obitmaker-fs-new-row {
    background: #fafafa;
}

/* ================================================================
   ADMIN — PLUGIN SETTINGS
   ================================================================ */

.obitmaker-settings-table {
    max-width: 600px;
    margin-bottom: 20px;
}

.obitmaker-settings-checkbox-col {
    width: 40px;
    text-align: center;
    vertical-align: top;
    padding-top: 14px;
}

.obitmaker-date-format-label {
    display: block;
    margin-bottom: 8px;
}

/* ================================================================
   ADMIN — FUNERAL OVERRIDE & EXTRA LINKS
   ================================================================ */

.obitmaker-funeral-overrides {
    background: #fff8e5;
    border-left: 4px solid #f0b849;
    padding: 10px 14px;
    margin: 10px 0 14px;
}

.obitmaker-override-label {
    display: inline-block;
    margin-right: 20px;
    font-weight: normal;
    cursor: pointer;
}

/* ================================================================
   ROLL OF HONOUR DATE PICKER
   ================================================================ */

.obitmaker-roh-picker {
    background: #f7f6fb;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 16px 20px;
    margin-bottom: 24px;
}

.obitmaker-roh-picker-form {
    margin: 0;
}

.obitmaker-roh-picker-fields {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
}

.obitmaker-roh-picker-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.obitmaker-roh-picker-field label {
    font-size: 13px;
    font-weight: 600;
    color: #444;
}

.obitmaker-roh-picker-field select {
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 14px;
    min-width: 130px;
}

.obitmaker-roh-picker-submit {
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

.obitmaker-roh-picker-btn {
    background: #615f8b;
    color: #fff;
    border: none;
    padding: 7px 18px;
    border-radius: 3px;
    font-size: 14px;
    cursor: pointer;
}

.obitmaker-roh-picker-btn:hover {
    background: #4e4c72;
}

.obitmaker-roh-picker-reset {
    font-size: 13px;
    color: #615f8b;
    text-decoration: underline;
}


/* ================================================================
   ONLINE BROADCAST BLOCK
   ================================================================ */
.obitmaker-broadcast {
    background: #f7f6fb;
    border-left: 4px solid #615f8b;
    padding: 10px 14px;
    margin: 12px 0 24px;
    border-radius: 0 4px 4px 0;
}
.obitmaker-broadcast p {
    margin: 4px 0;
}

/* ================================================================
   LOGIN REQUIRED MESSAGE
   ================================================================ */
.obitmaker-login-required {
    background: #fde8e8;
    border-left: 4px solid #cc0000;
    padding: 12px 16px;
    border-radius: 0 4px 4px 0;
    margin: 16px 0;
}
.obitmaker-login-required p {
    margin: 0;
    color: #cc0000;
    font-weight: 600;
}
.obitmaker-login-required a {
    color: #cc0000;
    text-decoration: underline;
}

/* ================================================================
   EXTRA LINKS (announcement and funeral zones)
   ================================================================ */
.obitmaker-extra-link {
    margin: 12px 0;
}
.obitmaker-extra-link-wrap {
    margin: 8px 0 12px;
}

/* Moved from includes/help.php */
.obitmaker-help-wrap { max-width:960px; }
    .obitmaker-main-tabs { display:flex; flex-wrap:wrap; gap:0; margin:16px 0 0; border-bottom:2px solid #615f8b; }
    .obitmaker-main-tab { padding:8px 16px; text-decoration:none; color:#444; background:#f0f0f0; border:1px solid #ccc; border-bottom:none; margin-right:4px; border-radius:4px 4px 0 0; font-size:13px; font-weight:600; }
    .obitmaker-main-tab:hover { background:#e0ddf0; color:#615f8b; }
    .obitmaker-main-tab.active { background:#615f8b; color:#fff; border-color:#615f8b; }
    .obitmaker-sub-tabs { display:flex; flex-wrap:wrap; gap:0; margin:0; padding:8px 12px; background:#f7f6fb; border:1px solid #ccc; border-top:none; border-bottom:2px solid #ccc; }
    .obitmaker-sub-tab { padding:5px 14px; text-decoration:none; color:#615f8b; background:#fff; border:1px solid #ccc; margin-right:6px; border-radius:3px; font-size:12px; font-weight:600; }
    .obitmaker-sub-tab:hover { background:#e0ddf0; }
    .obitmaker-sub-tab.active { background:#615f8b; color:#fff; border-color:#615f8b; }
    .obitmaker-help-content { background:#fff; border:1px solid #ccc; border-top:none; padding:24px 28px; line-height:1.7; font-size:13px; }
    .obitmaker-help-download { float:right; margin-bottom:16px; }
    .obitmaker-help-content h2 { font-size:18px; color:#615f8b; border-bottom:2px solid #e0ddf0; padding-bottom:6px; margin-top:0; }
    .obitmaker-help-content h3 { font-size:14px; color:#333; margin-top:24px; margin-bottom:6px; }
    .obitmaker-help-content h4 { font-size:13px; color:#444; margin-top:18px; margin-bottom:4px; font-style:italic; }
    .obitmaker-help-content p { margin-bottom:12px; }
    .obitmaker-help-content ul, .obitmaker-help-content ol { margin-left:20px; margin-bottom:12px; }
    .obitmaker-help-content li { margin-bottom:4px; }
    .obitmaker-help-content code { background:#f4f4f4; border:1px solid #ddd; padding:1px 5px; border-radius:3px; font-size:12px; color:#333; }
    .obitmaker-help-content pre { background:#f4f4f4; border:1px solid #ddd; padding:10px 14px; border-radius:4px; overflow-x:auto; margin-bottom:12px; }
    .obitmaker-help-content pre code { background:none; border:none; padding:0; font-size:12px; }
    .obitmaker-help-notice { background:#fff8e5; border-left:4px solid #f0b429; padding:10px 14px; margin-bottom:16px; border-radius:0 4px 4px 0; }
    .obitmaker-help-content strong { color:#333; }

/* Moved from includes/comparison.php */
.obitmaker-compare-wrap { max-width: 820px; }
    .obitmaker-compare-wrap h1 { font-size: 22px; color: #615f8b; margin-bottom: 8px; }
    .obitmaker-compare-intro { font-size: 14px; color: #444; margin-bottom: 24px; }
    .obitmaker-compare-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 24px; }
    .obitmaker-compare-table th { background: #615f8b; color: #fff; padding: 10px 14px; text-align: left; }
    .obitmaker-compare-table th.col-feature { width: 55%; }
    .obitmaker-compare-table th.col-lite, .obitmaker-compare-table th.col-pro { width: 22.5%; text-align: center; }
    .obitmaker-compare-table td { padding: 8px 14px; border-bottom: 1px solid #eee; vertical-align: middle; }
    .obitmaker-compare-table td.col-check { text-align: center; font-size: 16px; }
    .obitmaker-compare-table tr.section-header td { background: #f0eef8; font-weight: 700; color: #615f8b; padding: 10px 14px; border-bottom: 2px solid #ddd; }
    .obitmaker-compare-table tr:hover td { background: #fafafa; }
    .obitmaker-compare-footer { font-size: 13px; color: #555; margin-top: 16px; }
    .obitmaker-compare-cta { margin-top: 24px; }

/* Moved from includes/sentence-builder.php */
.obitmaker-sb-notice { background:#fff8e5; border-left:4px solid #f0b849; padding:10px 14px; margin:16px 0; max-width:860px; }
    .obitmaker-sb-tokens-reference { background:#f6f7f7; border:1px solid #ddd; padding:14px 18px; margin:20px 0; max-width:860px; border-radius:3px; }
    .obitmaker-sb-tokens-reference h3 { margin:0 0 8px; }
    .obitmaker-sb-token-grid { display:flex; flex-wrap:wrap; gap:8px; margin:10px 0; }
    .obitmaker-sb-token { background:#fff; border:1px solid #0073aa; color:#0073aa; padding:4px 10px; border-radius:3px; font-family:monospace; font-size:12px; cursor:pointer; user-select:none; }
    .obitmaker-sb-token:hover { background:#0073aa; color:#fff; }
    .obitmaker-sb-token-link { border-color:#b32d2e; color:#b32d2e; }
    .obitmaker-sb-token-link:hover { background:#b32d2e; color:#fff; }
    .obitmaker-sb-token-hint { min-height:20px; color:#2c7a2c; font-style:italic; }
    .obitmaker-sb-section { background:#fff; border:1px solid #ddd; padding:18px 20px; margin:20px 0; max-width:860px; border-radius:3px; }
    .obitmaker-sb-section h2 { margin:0 0 6px; font-size:14px; font-weight:600; }
    .obitmaker-sb-preview { background:#f0f6fc; border-left:4px solid #0073aa; padding:10px 14px; margin:12px 0; font-size:13px; border-radius:0 3px 3px 0; min-height:38px; }
    .obitmaker-sb-preview-multi { min-height:60px; }
    .obitmaker-sb-preview-text { margin-left:6px; font-style:italic; }
    .obitmaker-sb-preview-text p { margin:4px 0; }
    .obitmaker-sb-insert-btns { display:flex; flex-wrap:wrap; gap:6px; margin:10px 0 8px; }
    .obitmaker-sb-insert-btn { font-family:monospace; font-size:11px !important; padding:2px 8px !important; height:auto !important; line-height:1.6 !important; }
    .obitmaker-sb-btn-link { border-color:#b32d2e !important; color:#b32d2e !important; }
    .obitmaker-sb-btn-phrase { border-color:#2c7a2c !important; color:#2c7a2c !important; }
    .obitmaker-sb-token-phrase { border-color:#2c7a2c; color:#2c7a2c; }
    .obitmaker-sb-token-phrase:hover { background:#2c7a2c; color:#fff; }
    .obitmaker-sb-textarea { width:100%; font-size:13px; margin-top:6px; font-family:monospace; min-height:120px; }
    .obitmaker-sb-hint { font-weight:normal; font-style:italic; font-size:11px; color:#666; }
    .obitmaker-sb-links-table { max-width:860px; margin-top:12px; }
    .obitmaker-sb-link-name-input { width:180px; font-family:monospace; }
    .obitmaker-sb-link-label-input { width:100%; max-width:400px; }
    .obitmaker-sb-link-token-preview { font-size:11px; color:#0073aa; display:inline-block; margin-left:6px; }
    .obitmaker-sb-adhoc-row td { background:#f9f9f9; color:#666; font-style:italic; }
    .obitmaker-sb-actions { margin:10px 0 20px; display:flex; gap:10px; max-width:860px; }

/* ObitMaker Lite compliance helpers */
.obitmaker-hidden { display: none; }
.obitmaker-lite-pro-notice { border-left-color: #615f8b; }
.obitmaker-lite-pro-link { color: #615f8b; font-weight: 600; }
.obitmaker-lite-dismiss-link { color: #999; font-size: 12px; }
.obitmaker-lite-pro-button { background: #615f8b; border-color: #615f8b; }
.obitmaker-feature-list { list-style: disc; margin-left: 1.5em; }
.obitmaker-token-description { margin-top: 10px; }

.obitmaker-preview-link { pointer-events: none; }

/* ================================================================
   OBITMAKER LIST SHORTCODE
   ================================================================ */
.obitmaker-list-items {
    list-style: disc;
    margin: 0 0 0 1.4em;
    padding: 0;
}
.obitmaker-list-item {
    margin: 0 0 6px;
    padding: 0;
}
.obitmaker-list-title {
    text-decoration: underline;
}
.obitmaker-list-image {
    display: inline-block;
    margin-right: 8px;
    vertical-align: middle;
}
.obitmaker-list-image img {
    display: inline-block;
    width: 48px;
    height: 48px;
    object-fit: cover;
    vertical-align: middle;
}
.obitmaker-list-date {
    color: #666;
    font-size: 0.92em;
}
.obitmaker-list-excerpt {
    display: block;
    margin-top: 3px;
}
.obitmaker-list-empty {
    margin: 12px 0;
}
.obitmaker-list-pagination {
    margin-top: 14px;
}
.obitmaker-list-pagination ul {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.obitmaker-list-pagination a,
.obitmaker-list-pagination span {
    display: inline-block;
    padding: 4px 8px;
    border: 1px solid #ddd;
    text-decoration: none;
}
.obitmaker-list-pagination .current {
    font-weight: 600;
    background: #f4f4f4;
}