/*
 * ヘッダーの通知（ベル）の共通の見た目（core/js/notification.js）
 *   - パネルの見出しの「すべて既読」ボタン
 *   - お知らせの本文のモーダル（WordPress の記事の本文。<dialog class="notice-modal">）
 * パネル本体・項目の見た目は各アプリの CSS（keibi.css など）。
 */

/* --- すべて既読 --- */
.notification-read-all-btn {
    margin-left: auto;
    margin-right: 6px;
    padding: 4px 10px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #2563eb;
    font-size: 13px;
    line-height: 1.4;
    cursor: pointer;
}

.notification-read-all-btn:hover:not(:disabled) {
    background: #eff6ff;
}

.notification-read-all-btn:disabled {
    color: #a0aab8;
    cursor: default;
}

/* --- 本文のモーダル --- */
.notice-modal {
    width: min(760px, calc(100vw - 32px));
    max-width: none;
    max-height: calc(100vh - 48px);
    padding: 0;
    border: none;
    border-radius: 12px;
    background: #ffffff;
    color: #334155;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
    overflow: hidden;
}

.notice-modal[open] {
    display: flex;
    flex-direction: column;
}

.notice-modal::backdrop {
    background: rgba(15, 23, 42, 0.45);
}

.notice-modal-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 18px 22px 14px;
    border-bottom: 1px solid #e2e8f0;
}

.notice-modal-heading {
    flex: 1;
    min-width: 0;
}

.notice-modal-meta {
    display: flex;
    align-items: center;
    color: #64748b;
    font-size: 13px;
}

.notice-modal-title {
    margin: 4px 0 0;
    color: #1e293b;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.notice-modal-close {
    flex: none;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #64748b;
    font-size: 20px;
    cursor: pointer;
}

.notice-modal-close:hover {
    background: #f1f5f9;
}

.notice-modal-body {
    flex: 1;
    min-height: 0;
    padding: 18px 22px 22px;
    overflow-y: auto;
    font-size: 15px;
    line-height: 1.85;
    overflow-wrap: anywhere;
}

.notice-modal-body > :first-child {
    margin-top: 0;
}

.notice-modal-body h1,
.notice-modal-body h2,
.notice-modal-body h3,
.notice-modal-body h4 {
    margin: 1.4em 0 0.5em;
    padding-left: 10px;
    border-left: 4px solid #2563eb;
    color: #1e293b;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.5;
}

.notice-modal-body h5,
.notice-modal-body h6 {
    margin: 1.2em 0 0.4em;
    font-size: 15px;
    font-weight: 700;
}

.notice-modal-body p {
    margin: 0.5em 0 1em;
}

.notice-modal-body figure {
    margin: 14px 0;
}

.notice-modal-body img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
}

.notice-modal-body figcaption {
    margin-top: 6px;
    color: #64748b;
    font-size: 13px;
    text-align: center;
}

.notice-modal-body a {
    color: #2563eb;
    text-decoration: underline;
}

.notice-modal-body ul,
.notice-modal-body ol {
    margin: 0.5em 0 1em;
    padding-left: 1.6em;
}

.notice-modal-body blockquote {
    margin: 1em 0;
    padding: 8px 14px;
    border-left: 4px solid #cbd5e1;
    background: #f8fafc;
}

.notice-modal-body table {
    width: 100%;
    margin: 1em 0;
    border-collapse: collapse;
    font-size: 14px;
}

.notice-modal-body th,
.notice-modal-body td {
    padding: 6px 10px;
    border: 1px solid #e2e8f0;
}

.notice-modal-body th {
    background: #f8fafc;
}

.notice-modal-body pre {
    padding: 10px 12px;
    border-radius: 6px;
    background: #f1f5f9;
    white-space: pre-wrap;
}

.notice-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 22px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

.notice-modal-link {
    color: #2563eb;
    font-size: 13px;
    text-decoration: none;
}

.notice-modal-link:hover {
    text-decoration: underline;
}

.notice-modal-link[hidden] {
    display: none;
}

.notice-modal-close-btn {
    margin-left: auto;
    padding: 7px 20px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: #334155;
    font-size: 14px;
    cursor: pointer;
}

.notice-modal-close-btn:hover {
    background: #f1f5f9;
}

@media (max-width: 576px) {
    .notice-modal {
        width: calc(100vw - 16px);
        max-height: calc(100vh - 24px);
    }

    .notice-modal-header,
    .notice-modal-body,
    .notice-modal-footer {
        padding-left: 16px;
        padding-right: 16px;
    }
}
