@import url("../components/search-bar.css");
@import url("../components/select.css");

/* ==== Content01  ==== */
.mandatory-section,
.optional-section {
    margin: 50px 0 100px;
}

.summary {
    width: 100%;
    padding: 8px 20px;
    margin-bottom: 30px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border-radius: 10px;
}

.summary.mandatory {
    background: #DCEAFE;
}

.summary.optional {
    background: #E6F1EE;
}

.summary h3 {
    font-size: 24px;
    font-weight: 600;
}

.summary span {
    font-size: 24px;
    font-weight: 600;
}

.summary.mandatory span {
    color: #08429F;
}

.summary.optional span {
    color: #027273;
}

.sort {
    margin: 40px 0 25px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.sort label {
    white-space: nowrap;
    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;
}

.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 {
    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;
}

.optional-section .summarytable th {
    background: #F8FAF9;
}

.summarytable td {
    padding: 25px 15px;
    color: #414141;
    font-size: var(--font-base);
    font-weight: 400;
}

.summarytable tbody tr:nth-child(even) {
    background: #F5F9FF;
}

.optional-section .summarytable tbody tr:nth-child(even) {
    background: #F8FAF9;
}

.summarytable th:nth-child(1),
.summarytable td:nth-child(1) {
    width: 6%;
}

.summarytable th:nth-child(2),
.summarytable td:nth-child(2) {
    width: 22%;
}

.summarytable th:nth-child(3),
.summarytable td:nth-child(3) {
    width: 13%;
}

.summarytable th:nth-child(4),
.summarytable td:nth-child(4) {
    width: 24%;
}

.summarytable th:nth-child(5),
.summarytable td:nth-child(5) {
    width: 35%;
}

.summarytable tbody tr td:nth-child(2) {
    color: var(--color-black);
    font-size: var(--font-md);
}

.summarytable tbody tr td:nth-child(5) span {
    display: inline-block;
}

.soon {
    color: #5E5E5E;
}

.link-wrap {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    text-decoration: underline;
    transition: transform 0.3s ease;
}

.link-wrap:hover {
    color: #0751fe;
    transform: scale(1.01);
}

.link-wrap:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(7, 81, 254, 0.4);
    border-radius: 6px;
}

.link-wrap .icon {
    width: 14px;
    height: 14px;
}

@media (max-width:1024px) {

    .mandatory-section,
    .optional-section {
        margin: 40px 0 100px;
    }

    .summary {
        padding: 8px 16px;
        gap: 8px;
    }

    .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);
    }

    .summarytable thead {
        display: none;
    }

    .summarytable {
        display: block;
        border: 0;
        width: 100%;
    }

    .summarytable tbody {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 15px;
    }

    .summarytable tr {
        display: flex;
        flex-direction: column;
        gap: 13px;
        padding: 25px;
        background: #fff;
        border: 1px solid #D0D0D0;
        border-radius: 10px;
    }

    .summarytable td {
        height: auto;
        padding: 0;
        border: 0;
        display: flex;
        align-items: center;
        gap: 15px;
        line-height: 1.55;
        font-size: var(--font-md);
        color: #414141;
    }

    .summarytable td+td {
        margin-top: 4px;
    }

    .summarytable td:nth-child(1) {
        display: none;
    }

    .summarytable tbody tr td:nth-child(2) {
        order: 0;
        margin-bottom: 6px;
        font-weight: 600;
        font-size: var(--font-xl);
    }

    .summarytable th,
    .summarytable td {
        width: auto !important;
    }

    .summarytable td::before {
        content: "";
    }

    .summarytable td:nth-child(3)::before {
        content: "전화번호";
    }

    .summarytable td:nth-child(4)::before {
        content: "홈페이지";
    }

    .summarytable td:nth-child(5)::before {
        content: "주소";
    }

    .summarytable td:nth-child(3),
    .summarytable td:nth-child(4),
    .summarytable td:nth-child(5) {
        padding-bottom: 14px;
        border-bottom: 1px solid #D0D0D0;
    }

    .summarytable td:last-child {
        border-bottom: 0;
        padding-bottom: 0;
    }

    .summarytable td:nth-child(3)::before,
    .summarytable td:nth-child(4)::before,
    .summarytable td:nth-child(5)::before {
        white-space: nowrap;
        font-weight: 400;
        color: #414141;
        padding-left: 10px;
        text-align: left;
    }

    .summarytable td:nth-child(3),
    .summarytable td:nth-child(4) a {
        white-space: nowrap;
    }

    .summarytable td:nth-child(5) span {
        word-break: keep-all;
    }
}

@media (max-width:768px) {

    .mandatory-section,
    .optional-section {
        margin: 20px 0 70px;
    }

    .summary {
        margin-bottom: 20px;
        padding: 8px 12px;
        gap: 8px;
        border-radius: 10px;
        inline-size: 100%;
        flex-wrap: wrap;
    }

    .summary h3,
    .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%;
    }

    .summarytable tbody {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .summarytable tr {
        padding: 22px;
        gap: 12px;
    }

    .summarytable td {
        font-size: var(--font-md);
    }
}

@media (max-width:480px) {

    .mandatory-section,
    .optional-section {
        margin: 20px 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;
    }

    .summarytable tr {
        padding: 18px;
        border-radius: 10px;
        gap: 5px;
    }

    .summarytable td {
        gap: 10px;
        font-size: var(--font-base);
    }

    .summarytable tbody tr td:nth-child(2) {
        font-size: var(--font-md);
    }

    .summarytable td:nth-child(3),
    .summarytable td:nth-child(4),
    .summarytable td:nth-child(5) {
        padding-bottom: 7px;
    }

    .summarytable td:nth-child(5) {
        align-items: flex-start;
    }

    .summarytable td:nth-child(5) span {
        text-align: left;
    }
}