@import url("../components/search-bar.css");
@import url("../components/select.css");

/* ==== Content01 - Mandatory Section ==== */
.mandatory-section {
    margin: 0 0 100px;
}

.summary {
    width: 100%;
    margin-bottom: 30px;
    padding: 8px 20px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border-radius: 10px;
}

.summary.mandatory {
    background: #DCEAFE;
}

.summary h2 {
    font-size: 24px;
    font-weight: 600;
}

.summary span {
    font-size: 24px;
    font-weight: 600;
}

.summary.mandatory span {
    color: #08429F;
}

.sort {
    margin: 40px 0 25px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.sort label {
    font-size: var(--font-lg);
    font-weight: 500;
}

.sort select {
    padding: 7px 18px;
    background: white;
    border: 1px solid #A0A0A0;
    border-radius: 10px;
    font-size: var(--font-base);
    font-weight: 500;
    appearance: none;
}

.card-footer {
    display: flex;
    justify-content: center;
    margin-top: 12px;
}

.card-more {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    border-radius: 10px;
    background: #F1F1F1;
    font-size: var(--font-base);
    border: 0;
    cursor: pointer;
}

.card-more .label {
    color: var(--color-black);
    font-weight: 500;
}

.card-footer .card-more:focus-visible {
    outline: 3px solid #90C2FF;
    outline-offset: 3px;
    border-radius: 12px;
}

.card-footer .icon {
    width: 12px;
    height: auto;
    transition: transform .2s ease;
}

.mandatory-section .card-more:active,
.mandatory-section .card-more:hover {
    background: #d9e9ff;
    color: #0046B8;
    transition: background 0.2s ease, color 0.2s ease;
}

.optional-section .card-more:active,
.optional-section .card-more:hover {
    background: #d6f2ea;
    color: #027273;
    transition: background 0.2s ease, color 0.2s ease;
}

@media (max-width:1280px) {
    .summary {
        padding: 8px 18px;
        gap: 8px;
    }

    .sort {
        margin: 32px 0 22px;
        gap: 12px;
    }

    .sort select {
        padding: 7px 16px;
    }
}

@media (max-width:1024px) {

    .summary {
        padding: 8px 16px;
        gap: 8px;
    }

    .summary h2,
    .summary span {
        font-size: var(--font-xl);
    }

    .sort {
        margin: 28px 0 18px;
        gap: 10px;
        flex-wrap: wrap;
    }

    .sort label {
        font-size: var(--font-md);
    }

    .sort select {
        padding: 7px 14px;
        font-size: var(--font-base);
    }
}

@media (max-width:768px) {

    .summary {
        margin-bottom: 20px;
        padding: 8px 12px;
        gap: 8px;
        border-radius: 10px;
        inline-size: 100%;
        flex-wrap: wrap;
    }

    .summary h2,
    .summary span {
        font-size: var(--font-lg);
    }

    .sort {
        margin: 20px 0 14px;
        gap: 8px;
    }

    .sort select {
        padding: 8px 12px;
        font-size: var(--font-md);
        max-width: 100%;
    }

    .card-more {
        display: inline-flex;
    }

    .card-more[aria-expanded="true"] .icon {
        transform: rotate(180deg);
    }
}

@media (max-width:480px) {
    .mandatory-section {
        margin: 0 0 50px;
    }

    .summary {
        padding: 8px 10px;
        gap: 6px;
    }

    .sort {
        margin: 10px 0;
        gap: 6px;
    }

    .sort label {
        font-size: var(--font-base);
    }

    .sort select {
        padding: 7px 10px;
        font-size: var(--font-base);
        border-radius: 8px;
    }
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

.summarytable {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
    border-bottom: 2px solid var(--color-black);
}

.summarytable th,
.summarytable td {
    border-bottom: 1px solid #A0A0A0;
    font-size: var(--font-md);
}

.summarytable th {
    padding: 15px;
    background: #F5F9FF;
    border-top: 2px solid var(--color-black);
    border-bottom: 2px solid #A0A0A0;
    font-weight: 600;
}

.summarytable td {
    padding: 23px;
}

.summarytable tbody tr:nth-child(even) {
    background: #FAFCFF;
}

.summarytable tbody tr td:nth-child(1) {
    color: #595959;
    font-weight: 400;
}

.summarytable tbody tr td:nth-child(2) {
    color: #08429F;
    font-size: var(--font-xl);
    font-weight: 600;
}

.summarytable tbody tr td:nth-child(4) {
    font-weight: 600;
}

.summarytable tbody tr td:nth-child(5) span {
    padding: 5px;
    border-radius: 6px;
    background-color: #F1F4F8;
    color: #08429F;
    font-weight: 600;
}

@media (max-width:1024px) {
    .mandatory-section .summarytable thead {
        display: none;
    }

    .mandatory-section .summarytable {
        display: block;
        border: 0;
        width: 100%;
    }

    .mandatory-section .summarytable tbody {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .mandatory-section .summarytable tr {
        display: flex;
        flex-direction: column;
        gap: 14px;
        padding: 30px;
        background: #fff;
        border: 1px solid #D0D0D0;
        border-radius: 10px;
    }

    .mandatory-section .summarytable td {
        display: flex;
        align-items: center;
        gap: 20px;
        padding: 0;
        border: 0;
        line-height: 1.55;
        font-size: var(--font-lg);
    }

    .mandatory-section .summarytable td+td {
        margin-top: 4px;
    }

    .mandatory-section .summarytable td:nth-child(1) {
        display: none;
    }

    .mandatory-section .summarytable td:nth-child(2) {
        order: 0;
        margin-bottom: 4px;
        color: #0046B8;
        font-weight: 600;
        font-size: var(--font-2xl);
    }

    .mandatory-section .summarytable td::before {
        content: "";
    }

    .mandatory-section .summarytable td:nth-child(3)::before {
        content: "자조금단체명";
    }

    .mandatory-section .summarytable td:nth-child(4)::before {
        content: "설립연도";
    }

    .mandatory-section .summarytable td:nth-child(5)::before {
        content: "의무자조금 설치일";
    }

    .mandatory-section .summarytable td:nth-child(3),
    .mandatory-section .summarytable td:nth-child(4),
    .mandatory-section .summarytable td:nth-child(5) {
        border-bottom: 1px solid #D0D0D0;
        padding-bottom: 14px;
    }

    .mandatory-section .summarytable td:last-child {
        border-bottom: 0;
        padding-bottom: 0;
    }

    .mandatory-section .summarytable td:nth-child(3)::before,
    .mandatory-section .summarytable td:nth-child(4)::before,
    .mandatory-section .summarytable td:nth-child(5)::before {
        flex: 0 0 120px;
        color: #414141;
        font-weight: 400;
    }

    .mandatory-section .summarytable td:nth-child(4) {
        font-weight: 600;
    }

    .mandatory-section .summarytable td:nth-child(5) span {
        display: inline-flex;
        align-items: center;
        padding: 2px 8px;
        border-radius: 6px;
        background: #F1F4F8;
        color: #0046B8;
        font-weight: 600;
    }

    .mandatory-section .summarytable td:nth-child(3)::before,
    .mandatory-section .summarytable td:nth-child(4)::before,
    .mandatory-section .summarytable td:nth-child(5)::before {
        padding-left: 10px;
        text-align: left;
        flex-basis: 110px;
    }
}

@media (max-width:1024px) and (min-width:769px) {
    .mandatory-section .summarytable tbody tr {
        background: white;
    }

    .mandatory-section .summarytable tbody tr:nth-child(4n+2),
    .mandatory-section .summarytable tbody tr:nth-child(4n+3) {
        background: #F5F9FF;
    }
}

@media (max-width:768px) {
    .mandatory-section .summarytable tbody {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .mandatory-section .summarytable tr {
        padding: 22px;
        gap: 12px;
    }

    .mandatory-section .summarytable td {
        font-size: var(--font-md);
    }

    .mandatory-section .summarytable td:nth-child(2) {
        font-size: var(--font-xl);
    }
}

@media (max-width:480px) {
    .mandatory-section .summarytable tr {
        padding: 18px;
        border-radius: 10px;
        gap: 8px;
    }

    .mandatory-section .summarytable td {
        gap: 10px;
        font-size: var(--font-base);
    }

    .mandatory-section .summarytable td:nth-child(3),
    .mandatory-section .summarytable td:nth-child(4),
    .mandatory-section .summarytable td:nth-child(5) {
        padding-bottom: 7px;
    }
}

/* ==== Content01 - Optional Section ==== */

.summary.optional {
    background: #E6F1EE;
}

.summary.optional span {
    color: #027273;
}

.optional-cards {
    display: grid;
    gap: 20px;
}

.optional-cards .card {
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    background: white;
    border-radius: 10px;
    border: 1px solid #D0D0D0;
}

.card:nth-child(even) {
    background: #F8FAF9;
}

.card-header {
    min-width: 35%;
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: var(--font-xl);
}

.card-number {
    color: #595959;
    font-size: var(--font-md);
    font-weight: 400;
}

.card-item {
    color: #385757;
    font-weight: 600;
}

.card-body {
    display: flex;
    gap: 100px;
    font-size: var(--font-md);
    font-weight: 500;
}

.card-body .item {
    display: flex;
    align-items: center;
    gap: 20px;
}

.card-body .item:first-child {
    width: 470px;
    border-right: 1px solid #D0D0D0;
    padding-right: 70px;
}

.card-body .item:first-child .label {
    width: 120px;
}

.card-body .label {
    color: #414141;
    font-weight: 400;
    flex-shrink: 0;
}

.card-body .year {
    padding: 2px 8px;
    background: #EEF4F3;
    color: #385757;
    border-radius: 6px;
    font-weight: 600;
}

@media (max-width:1280px) {
    .optional-cards {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .optional-cards .card {
        padding: 22px 28px;
    }

    .card-header {
        min-width: 0;
    }

    .card-body {
        gap: 80px;
    }
}

@media (max-width:1024px) {
    .optional-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .optional-cards .card {
        padding: 30px;
        border: 1px solid #D0D0D0;
        border-radius: 10px;
        flex-direction: column;
    }

    .card-header {
        padding-left: 5px;
        margin-bottom: 18px;
        gap: 8px;
    }

    .card-number {
        display: none;
    }

    .card-item {
        font-size: var(--font-2xl);
    }

    .card-body {
        gap: 14px;
        font-size: var(--font-lg);
        flex-direction: column;
    }

    .card-body .item {
        gap: 20px;
    }

    .card-body .item:first-child {
        width: auto;
        padding-right: 0;
        padding-bottom: 14px;
        border-right: 0;
        border-bottom: 1px solid #D0D0D0;
    }

    .card-body .label {
        min-width: 120px;
        color: #414141;
        font-weight: 500;
    }

    .card-body .year {
        padding: 2px 8px;
        border-radius: 6px;
        background: #EEF4F3;
        color: #385757;
        font-weight: 600;
    }
}

@media (max-width:768px) {
    .optional-cards {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .optional-cards .card {
        padding: 22px;
    }

    .card-item {
        padding-left: 10px;
        font-size: var(--font-xl);
    }

    .card-body {
        font-size: var(--font-md);
        gap: 12px;
        padding-bottom: 0;
    }

    .card-body .label {
        padding-left: 10px;
        min-width: 110px;
    }

    .optional-cards .card {
        background: #fff !important;
    }

    .optional-cards .card:nth-child(even) {
        background: #F8FAF9 !important;
    }
}

@media (max-width:480px) {
    .optional-cards .card {
        padding: 18px;
        border-radius: 10px;
    }

    .card-item {
        font-size: var(--font-lg);
    }

    .card-body {
        font-size: var(--font-base);
        gap: 10px;
    }

    .card-body .item:first-child {
        padding-bottom: 10px;
    }

    .card-body .label {
        min-width: 96px;
    }
}