@import "../css/common.css";

body {
    background: #f2f6fb;
}

main.container {
    max-width: 1024px;
    margin: 0 auto;
    padding: 24px 16px 40px;
}

.maintext {
    font-size: 2rem;
    font-weight: 900;
    text-align: center;
    margin: 24px 0 8px;
}

#subtext {
    text-align: center;
    color: #4a4a4a;
    margin-bottom: 24px;
}

.schedule-section,
.support-section {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
    padding: 24px;
    margin-bottom: 24px;
}

.schedule-section h2,
.support-section h2 {
    margin-top: 0;
}

.schedule-icons {
    display: grid;
    grid-template-columns: repeat(9, minmax(40px, 1fr));
    gap: 10px;
    margin: 16px 0;
}

.page-button {
    border: 1px solid #4cafef;
    background: white;
    color: #4cafef;
    border-radius: 999px;
    padding: 10px 0;
    cursor: pointer;
    font-weight: 700;
    transition: background 0.2s ease, color 0.2s ease;
}

.page-button:hover,
.page-button.active {
    background: #4cafef;
    color: white;
}

.save-group-area {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.save-preferred-btn {
    border: 1px solid #4cafef;
    background: #4cafef;
    color: #fff;
    border-radius: 999px;
    padding: 10px 18px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    box-shadow: 0 6px 18px rgba(76, 175, 239, 0.18);
}

.save-preferred-btn:hover,
.save-preferred-btn:focus-visible {
    background: #3a8de0;
    outline: none;
}

.save-preferred-btn:focus-visible {
    box-shadow: 0 0 0 4px rgba(76, 175, 239, 0.2);
}

.save-group-area .small {
    margin: 0;
    color: #6e7680;
}

.schedule-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.schedule-detail-item {
    background: #f4fbff;
    border: 1px solid #cfe9ff;
    border-radius: 12px;
    padding: 14px;
    min-height: 54px;
    color: #1f4d7a;
}

.schedule-container {
    margin-top: 20px;
}

.schedule-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
}

.schedule-table th,
.schedule-table td {
    border: 1px solid #d4e6f5;
    padding: 12px 10px;
    text-align: left;
}

.schedule-table th {
    background: #eef7ff;
    color: #1a4f78;
}

.message-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.message-list li {
    margin-bottom: 12px;
}

.notice-item {
    background: #f8fbff;
    border: 1px solid #d7e7f8;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 10px;
}

.notice-item summary {
    cursor: pointer;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #1f4d7a;
    font-size: 0.98rem;
    font-weight: 700;
    list-style: none;
}

.notice-item summary::-webkit-details-marker {
    display: none;
}

.notice-item summary::after {
    content: '\25bc';
    transition: transform 0.2s ease;
    margin-left: 12px;
}

.notice-item[open] summary::after {
    transform: rotate(180deg);
}

.notice-meta {
    color: #6e7680;
    font-weight: 400;
    font-size: 0.95rem;
}

.notice-content {
    padding: 0 16px 16px;
    background: #f7fbff;
    color: #243f5c;
}

.notice-content p {
    margin: 0;
    line-height: 1.65;
    white-space: pre-wrap;
}

.notice-attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.notice-attachment-btn {
    border: 1px solid #c8def7;
    background: #edf5ff;
    color: #1d4f7a;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 0.86rem;
    cursor: pointer;
}

.notice-attachment-btn:hover {
    background: #dcecff;
}

.notice-lists-grid,
.notice-post-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 18px;
}

.notice-card {
    background: #fcfdff;
    border: 1px solid #e3eaf6;
    border-radius: 16px;
    padding: 18px;
}

.notice-card h3 {
    margin-top: 0;
}

#groupNoticeCard {
    border-top: 4px solid var(--group-accent-color, #1f4d7a);
}

#groupNoticeCard h3 {
    color: var(--group-accent-color, #1f4d7a);
}

.notice-card form label {
    display: block;
    margin-bottom: 12px;
}

.notice-card input[type="text"],
.notice-card textarea,
.notice-card select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d3dce8;
    border-radius: 10px;
    margin-top: 8px;
    box-sizing: border-box;
}

.notice-card button {
    margin-top: 8px;
}

@media (max-width: 840px) {
    .notice-lists-grid,
    .notice-post-grid {
        grid-template-columns: 1fr;
    }
}

.message-list li img {
    display: block;
    max-width: 100%;
    border-radius: 12px;
    margin-top: 10px;
}

.small {
    margin: 0;
    font-size: 0.95rem;
    color: #6e7680;
}

.loading-state {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    color: #4a6b8d;
    font-weight: 600;
}

.loading-state[hidden] {
    display: none !important;
}

.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 3px solid #d8e7f8;
    border-top-color: #3a8de0;
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.attachment-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
}

.attachment-modal[hidden] {
    display: none !important;
}

.attachment-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(16, 24, 40, 0.64);
}

.attachment-modal-content {
    position: relative;
    width: min(960px, calc(100vw - 24px));
    max-height: calc(100vh - 24px);
    background: #ffffff;
    border-radius: 12px;
    overflow: auto;
    padding: 14px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.attachment-modal-close {
    position: absolute;
    top: 8px;
    right: 8px;
    border: none;
    background: transparent;
    font-size: 1.8rem;
    line-height: 1;
    color: #37516a;
    cursor: pointer;
}

.attachment-modal-title {
    margin: 0 28px 10px 0;
    color: #1b405f;
}

.attachment-modal-body {
    min-height: 120px;
}

.attachment-modal-image {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 180px);
    margin: 0 auto;
    border-radius: 8px;
}

.attachment-modal-pdf {
    width: 100%;
    min-height: 70vh;
    border: 1px solid #d4e4f4;
    border-radius: 8px;
}

@media (max-width: 768px) {
    .schedule-icons {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .schedule-details {
        grid-template-columns: 1fr;
    }
}

