/* 공지사항 페이지 - relation-manage 스타일 기반 */

/* page-header는 mypage_common.css에서 처리 */


.notice-page {
    flex: 1;
    padding: 32px;
    background: #f7f8fb;
    min-height: calc(100vh - var(--header-height, 70px));
    animation: noticeFadeIn 0.6s ease;
}

@keyframes noticeFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 페이지 헤더 */


@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* page-header / page-subtitle는 mypage_common.css에서 처리 */

/* 검색 카드 */
.notice-filter {
    margin-bottom: 28px;
    animation: slideUp 0.5s ease 0.05s backwards;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(25px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.inquiry-wrap {
    display: flex;
    align-items: baseline;
    gap:15px;
}

.notice-filter-row {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

.inquiry-category-row {
    margin-bottom: 18px;
}

.inquiry-category-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.inquiry-chip {
    border: 2px solid transparent;
    border-radius: 999px;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 600;
    color: #5a6078;
    background: #fff;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.inquiry-chip .chip-count {
    min-width: 26px;
    height: 22px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.07);
    color: inherit;
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
}

.inquiry-chip:hover {
    border-color: #ff6a00;
    color: #ff6a00;
    background: #ffffff;
}

.inquiry-chip.active {
    border-color: transparent;
    background: #ff6a00;
    color: #fff;
}

.inquiry-chip.active .chip-count {
    background: rgba(255, 255, 255, 0.25);
    color: inherit;
}

.inquiry-search-row {
    align-items: center;
}

.notice-search-field {
    flex: 1;
    min-width: 280px;
    position: relative;
}

.notice-search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform:translateY(-50%);
    color: #999;
}

.notice-search-input {
    width: 100%;
    padding: 15px 20px 15px 50px;
    border-radius: 30px;
    border: 2px solid #e2e8f0;
    background: #ffffff;
    font-size: 15px;
    color: #1f2937;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: inset 0 2px 5px rgba(15, 23, 42, 0.06);
}

.notice-search-input::placeholder {
    color: #9ca3af;
}

.notice-search-input:focus {
    outline: none;
    border-color: #c7d7ff;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
}

.inquiry-filter-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.inquiry-filter-actions .btn-action-primary {
    border: none;
    padding: 14px 26px;
    border-radius: 16px;
    background: #ff6c0f;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    box-shadow: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}


.inquiry-filter-actions .btn-action-primary:active {
    transform: translateY(0);
    box-shadow: none;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* 테이블 카드 */
.notice-board {
    animation: slideUp 0.5s ease 0.1s backwards;
}

.notice-table-card {
    background: #fff;
    border-radius: 22px;
    border: 1px solid #edf0f7;
    box-shadow: 0 22px 40px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.notice-table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid #f1f3f9;
    flex-wrap: wrap;
    gap: 12px;
}

.notice-table-subtitle {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #9ca3af;
    margin-bottom: 6px;
}

.notice-table-title {
    font-size: 24px;
    font-weight: 800;
    color: #111827;
    margin: 0;
}

.notice-count {
    font-weight: 500;
    color: #6b7280;
    font-size:15px;
}

.notice-table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.notice-table {
    width: 100%;
    border-collapse: collapse;
    /* min-width: 720px; */
}

.notice-table th {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #9ca3af;
    background: #fafbff;
    padding: 16px 24px;
    border-bottom: 1px solid #eef1f7;
    text-align: center;
}

.notice-table th:nth-child(1),.notice-table tbody tr td:nth-child(1) {width:100px;}
.notice-table th:nth-child(3),.notice-table tbody tr td:nth-child(3) {white-space: break-spaces;}
.notice-table th:nth-child(4),.notice-table tbody tr td:nth-child(4) {width:130px;}
.notice-table th:nth-child(5),.notice-table tbody tr td:nth-child(5) {width:130px;}


.notice-table tbody tr td:first-child {
    font-weight: 600;
    color: #9aa0b9;
}

.notice-table tbody tr td:last-child {
    text-align: center;
    width:fit-content;
}

.notice-table td {
    padding: 20px 24px;
    border-bottom: 1px solid #f3f4f8;
    font-size: 15px;
    color: #1f2937;
    vertical-align: middle;
}

.inquiry-table td:nth-child(2) {
    line-height: 1.5;
    word-break: break-all;
}

.inquiry-table td:nth-child(3) {
    font-weight: 600;
    color: #60648b;
}

.inquiry-table td:nth-child(4) {
    text-align: center;
}

.inquiry-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.3px;
    border: 1px solid transparent;
}

.inquiry-status-badge.waiting {
    background: rgba(255, 193, 7, 0.15);
    border-color: rgba(255, 193, 7, 0.35);
    color: #f59e0b;
}

.inquiry-status-badge.done {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.35);
    color: #10b981;
}

.inquiry-table .notice-title strong {
    font-weight: 700;
}

.notice-row {
    cursor: pointer;
    position: relative;
    transition: background 0.25s ease, transform 0.2s ease;
}

.notice-row:hover {
    background: linear-gradient(90deg, rgba(255, 108, 15, 0.08), rgba(255, 108, 15, 0));
}

.notice-table tbody td:nth-child(1) {
    width: 100px;
    text-align: center;
}

.notice-table tbody td:nth-child(3) {
    width: 130px;
    text-align: center;
    justify-content: flex-end;
}

.notice-table tbody td:nth-child(4) {
    width: 90px;
    text-align: center;
    justify-content: flex-end;
}

.notice-row {
    cursor: pointer;
    position: relative;
    transition: background 0.25s ease, transform 0.2s ease;
}

.notice-row:hover {
    background: linear-gradient(90deg, rgba(255, 108, 15, 0.08), rgba(255, 108, 15, 0));
}

.notice-row-pinned {
    background: rgba(124, 58, 237, 0.08);
}

.notice-row-pinned .notice-title {
    color: #5b21b6;
}

.notice-title-cell {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.notice-title {
    font-weight: 700;
    color: #111827;
    font-size: 16px;
}

.notice-preview {
    font-size: 13px;
    color: #6b7280;
    margin-top: 4px;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
}

.notice-flag-cell {
    width: 140px;
}

.notice-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 18px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    background: #f3f4f6;
    color: #9ca3af;
    min-width: 90px;
}

.notice-flag.is-pinned {
    background: rgba(124, 58, 237, 0.15);
    color: #6d28d9;
    box-shadow: 0 6px 16px rgba(109, 40, 217, 0.15);
}

.notice-type {
    font-weight: 600;
    color: #4b5563;
}

.notice-date {
    font-family: 'SUIT', 'Spoqa Han Sans Neo', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #4b5563;
    font-weight: 500;
}

.notice-views {
    color: #6b7280;
    font-weight: 600;
}

/* 빈 상태 */
.notice-empty {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    gap: 12px;
    color: #6b7280;
}

.notice-empty svg {
    color: #cbd5f5;
}

/* 모달 */
.notice-detail-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.notice-detail-modal .modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
}

.notice-detail-modal .modal-content {
    position: relative;
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 30px 60px rgba(15, 23, 42, 0.2);
    max-width: 720px;
    width: 92vw;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modalIn 0.35s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.notice-detail-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 30px;
    border-bottom: 1px solid #f0f0f5;
}

.notice-detail-modal .modal-title {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
}

.notice-detail-modal .modal-close {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: none;
    background: #f5f5f7;
    font-size: 24px;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notice-detail-modal .modal-close:hover {
    background: #ffebee;
    color: #f44336;
}

.notice-detail-modal .modal-body {
    padding: 24px 30px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.inquiry-modal .modal-content {
    max-width: 760px;
    width: 94vw;
    border-radius: 26px;
    border: 1px solid rgba(226, 232, 240, 0.85);
    box-shadow: 0 25px 60px rgba(15, 23, 42, 0.25);
    overflow: hidden;
    background: #fff;
}

.inquiry-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 28px 34px;
    background: #ffffff;
}

.inquiry-modal-header .modal-subtitle {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: #ff7b23;
    margin-bottom: 6px;
}

.inquiry-modal-header .modal-title {
    font-size: 24px;
    font-weight: 800;
    color: #111827;
    margin: 0;
}

.inquiry-modal-header .modal-close {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #f3f4f6;
    color: #6b7280;
    font-size: 24px;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.inquiry-modal-header .modal-close:hover {
    background: #ffe0cc;
    color: #ff6a00;
    transform: rotate(90deg);
}

.inquiry-modal-body {
    padding: 32px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.inquiry-field-group {
    display: flex;
    flex-direction: column;
    margin-bottom:20px;
}

.inquiry-field-group .form-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #475569;
}

.inquiry-field-group .required {
    color: #ff7b23;
}

.inquiry-field-group .form-input,
.inquiry-field-group .form-textarea {
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    padding: 14px 18px;
    font-size: 15px;
    color: #1f2937;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.inquiry-field-group .form-textarea {
    resize: none;
    min-height: 180px;
}

.inquiry-field-group .form-input:focus,
.inquiry-field-group .form-textarea:focus {
    outline: none;
    border-color: #ff9b4b;
    box-shadow: 0 0 0 4px rgba(255, 155, 75, 0.2);
}

.field-hint {
    font-size: 13px;
    color: #94a3b8;
    margin-top: 2px;
}

.inquiry-info-card {
    background: #fff5ec;
    border: 1px solid rgba(255, 145, 77, 0.3);
    border-radius: 20px;
    padding: 18px 22px;
    color: #b45309;
    margin-bottom:20px;
}

.inquiry-info-card .info-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 8px;
}

.inquiry-info-card ul {
    margin: 0;
    display: flex;
    flex-direction: column;
    font-size: 13px;
}

.inquiry-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.btn-inquiry-primary,
.btn-inquiry-secondary {
    border-radius: 16px;
    padding: 14px 26px;
    font-size: 15px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-inquiry-secondary {
    background: #f3f4f6;
    color: #475569;
}

.btn-inquiry-secondary:hover {
    box-shadow: none;
}

.btn-inquiry-primary {
    background: #ff7b23;
    color: #fff;
}

.btn-inquiry-primary:hover {
    box-shadow: none;
}

.inquiry-detail-top {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.inquiry-status-chip {
    align-self: flex-start;
    padding: 8px 22px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    background: #f1f5f9;
    color: #475569;
}

.inquiry-status-chip.waiting {
    background: rgba(251, 191, 36, 0.2);
    color: #c27803;
}

.inquiry-status-chip.done {
    background: rgba(16, 185, 129, 0.18);
    color: #0f9d68;
}

.inquiry-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

.inquiry-detail-meta .meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.inquiry-detail-meta .meta-label {
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #94a3b8;
}

.inquiry-detail-meta .meta-value {
    font-size: 15px;
    font-weight: 600;
    color: #0f172a;
}

.inquiry-detail-content {
    background: #fff;
    border-radius: 22px;
    border: 1px solid #f1f5f9;
    padding: 24px;
    color: #475569;
    line-height: 1.7;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.inquiry-detail-section + .inquiry-detail-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
}

.content-section-title {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 10px;
}

.content-text.muted {
    color: #cbd5f5;
}

.content-meta {
    margin-top: 6px;
    font-size: 13px;
    color: #94a3b8;
}

.inquiry-modal-footer .btn-inquiry-secondary {
    background: #fff;
    border: 1px solid #e2e8f0;
}


.notice-detail-meta {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.notice-detail-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 999px;
    background: #ff6c0f;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(255, 108, 15, 0.25);
}

.notice-detail-info {
    display: flex;
    gap: 16px;
    color: #6b7280;
    font-size: 14px;
}

.notice-detail-info .meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.notice-detail-info svg {
    width: 16px;
    height: 16px;
}

.notice-detail-content {
    line-height: 1.7;
    color: #1f2937;
}

.notice-detail-footer {
    display: flex;
    justify-content: flex-end;
}

.btn-notice-nav {
    padding: 12px 20px;
    border-radius: 12px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-notice-nav.btn-list {
    background: #6366f1;
    color: #fff;
    box-shadow: none;
}


/* 반응형 */
@media (max-width: 1024px) {

    .notice-table-title {
        font-size:22px;
    }

    .inquiry-category-group::-webkit-scrollbar {
        display: none;
    }

    .notice-search-input {
        padding:10px 10px 10px 40px;
    }

    .notice-table-header {
        padding:20px;
    }

    .notice-table thead {
        display: none;
    }

    .notice-table tbody tr {
        display: flex;
        flex-direction: column;
        gap:5px;
        padding: 20px;
        border-bottom:1px solid #eee;
    }

    .notice-table tbody tr:last-child {
        border-bottom:unset;
    }

    .notice-table td {
        padding:0;
        border-bottom:unset;
    }

    .notice-table th:nth-child(1), .notice-table tbody tr td:nth-child(1) {
        display: none;
    }

    .notice-table tbody td:nth-child(3) {
        width:unset;
        display: block;
        text-align: left;
    }

    .notice-table th:nth-child(4), .notice-table tbody tr td:nth-child(4) {
        width:unset;
        display: block;
        text-align: left;
    }


    .notice-page {
        padding: 24px;
    }


}

@media (max-width: 768px) {

    .notice-table-title {
        font-size:20px;
    }

    .notice-page {
        padding: 20px;
    }


    .page-header-actions {
        width: 100%;
        justify-content: stretch;
    }

    .page-header-actions .btn-primary {
        width: 100%;
        justify-content: center;
    }

    .notice-filter-row {
        flex-direction: column;
    }

    .notice-search-input {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .notice-search-input .search-icon {
        display: none;
    }

    .notice-search-input input {
        width: 100%;
    }

    .notice-search-input button {
        width: 100%;
        display: inline-flex;
        justify-content: center;
        margin-top: 10px;
    }

    .notice-table-wrapper {
        overflow-x: auto;
    }

    .notice-table {
        min-width: 0;
    }

    .notice-table tbody tr td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
    }

    .notice-table tbody tr td:nth-child(2) {
        flex-direction: column;
        align-items: flex-start;
    }


    .inquiry-filter-actions {
        width: 100%;
    }

    .inquiry-filter-actions .btn-action-primary {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 540px) {
    .notice-page {
        padding: 16px;
    }


    .inquiry-category-group {
        flex-wrap: nowrap;
        overflow-x: auto;
    }

    .inquiry-chip {
        flex-shrink: 0;
    }


    .notice-table tbody tr td {
        flex-direction: column;
        align-items: flex-start;
    }

    .notice-table tbody tr td:last-child {
        width: 100%;
        align-items: flex-start;
        text-align: left;
    }
}
