/* notice.php — 컴팩트 블루 톤 */

body.midam-notice-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

body.midam-notice-page .notice-page__main {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    width: 100%;
}

body.midam-notice-page .notice-container {
    flex: 1;
}

.notice-container {
    max-width: 760px;
    width: 100%;
    margin: 20px auto 40px;
    padding: 0 16px;
}

.page-header {
    background: #fff;
    padding: 16px 18px;
    border-radius: 12px;
    margin-bottom: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.page-header h2 {
    color: #0f172a;
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0 0 4px;
}

.page-header p {
    color: #64748b;
    font-size: 0.8125rem;
    margin: 0;
}

.search-box {
    background: #fff;
    padding: 12px 14px;
    border-radius: 12px;
    margin-bottom: 12px;
    border: 1px solid #e2e8f0;
}

.search-box form {
    display: flex;
    gap: 8px;
}

.search-box input {
    flex: 1;
    min-width: 0;
    padding: 9px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.875rem;
    color: #0f172a;
}

.search-box input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.search-box button {
    padding: 9px 16px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.notice-list {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.notice-item {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px 12px;
    cursor: pointer;
    transition: background 0.15s;
}

.notice-item:hover {
    background: #f8fafc;
}

.notice-item:last-child {
    border-bottom: none;
}

.notice-badge {
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.badge-important {
    background: #fee2e2;
    color: #dc2626;
}

.badge-normal {
    background: #dbeafe;
    color: #2563eb;
}

.notice-title {
    font-size: 0.875rem;
    color: #334155;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notice-title.important {
    font-weight: 600;
    color: #b91c1c;
}

.notice-meta {
    color: #94a3b8;
    font-size: 0.75rem;
    display: flex;
    gap: 10px;
    white-space: nowrap;
}

.notice-detail {
    background: #fff;
    border-radius: 12px;
    padding: 20px 22px;
    border: 1px solid #e2e8f0;
}

.notice-detail h3 {
    font-size: 1.125rem;
    color: #0f172a;
    margin: 0 0 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
    line-height: 1.45;
}

.notice-detail .meta {
    color: #64748b;
    font-size: 0.8125rem;
    margin-bottom: 20px;
    display: flex;
    gap: 16px;
}

.notice-detail__article {
    padding: 22px 24px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.notice-detail__content {
    line-height: 1.75;
    color: #334155;
    font-size: 0.9375rem;
    word-break: break-word;
}

.notice-detail__content p,
.notice-detail__content ul,
.notice-detail__content ol {
    margin: 0 0 0.85em;
}

.notice-detail__content p:last-child,
.notice-detail__content ul:last-child,
.notice-detail__content ol:last-child {
    margin-bottom: 0;
}

.notice-detail__content img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 12px 0;
    border-radius: 8px;
}

.notice-detail__content a {
    color: #2563eb;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.notice-detail__actions {
    margin-top: 28px;
    padding-top: 4px;
}

.back-btn {
    display: inline-block;
    margin-top: 0;
    padding: 9px 18px;
    background: #f1f5f9;
    color: #334155;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    border: 1px solid #e2e8f0;
}

.back-btn:hover {
    background: #e2e8f0;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-top: 16px;
}

.pagination a,
.pagination span {
    padding: 7px 11px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #475569;
    text-decoration: none;
    font-size: 0.8125rem;
}

.pagination a:hover {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

.pagination .active {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

.empty-message {
    text-align: center;
    padding: 40px 16px;
    color: #94a3b8;
    font-size: 0.875rem;
}

.notice-attachments {
    margin-top: 28px;
    padding: 18px 20px 20px;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #dbe3ee;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.notice-attachments__title {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid #dbe3ee;
    font-size: 0.8125rem;
    font-weight: 700;
    color: #334155;
    letter-spacing: -0.01em;
}

.notice-attachments__title i {
    font-size: 1rem;
    color: #2563eb;
}

.notice-attachments__list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.notice-attach-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.notice-attach-card:hover {
    background: #fff;
    border-color: #93c5fd;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08);
}

.notice-attach-card__ext {
    flex-shrink: 0;
    min-width: 42px;
    padding: 6px 8px;
    border-radius: 6px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 0.6875rem;
    font-weight: 800;
    text-align: center;
    letter-spacing: 0.02em;
}

.notice-attach-card__name {
    flex: 1;
    min-width: 0;
    font-size: 0.875rem;
    color: #334155;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notice-attach-card__icon {
    flex-shrink: 0;
    font-size: 1.125rem;
    color: #94a3b8;
    transition: color 0.15s;
}

.notice-attach-card:hover .notice-attach-card__icon {
    color: #2563eb;
}

@media (max-width: 640px) {
    .notice-item {
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto;
    }

    .notice-meta {
        grid-column: 2;
        justify-self: start;
    }

    .notice-detail__article {
        padding: 16px 14px;
    }

    .notice-attachments {
        margin-top: 22px;
        padding: 14px;
    }
}
