/* ============================================================================
   add_basic.css - 기본 스타일
   Refactored: 2024-12-21
   ============================================================================ */

/* ----------------------------------------------------------------------------
   1. CSS 변수 정의
   ---------------------------------------------------------------------------- */
:root {
    /* 레이아웃 */
    --g-window-width: 1200px;
    --g-max-width: 1400px;

    /* 폰트 */
    --g-font-family: 'Noto Sans KR', sans-serif;
    --g-font-h1: 3rem;
    --g-font-h2: 2.5rem;
    --g-font-h3: 2rem;
    --g-font: 1.2rem;

    /* 줄간격 */
    --g-line-h1: 1.2;
    --g-line-h2: 1.3;
    --g-line-h3: 1.3;
    --g-line: 1.4;

    /* 입력 컨트롤 크기 */
    --g-input-width: 40px;
    --g-input-height: 40px;
    --g-input-small-width: 30px;
    --g-input-small-height: 30px;
    --g-input-small-font: 1rem;

    /* 색상 팔레트 */
    --c-white: #fff;
    --c-black: #333;
    --c-gray-light: #eee;
    --c-gray-medium: #bfbfbf;
    --c-gray-dark: #555;
    --c-border: #8da6a9;
    --c-background: #ffd;

    /* 그림자 */
    --shadow-light: 3px 3px 10px 0 rgb(0 0 0 / 10%);
    --shadow-medium: 3px 3px 5px 0 rgb(0 0 0 / 10%);
}

/* ----------------------------------------------------------------------------
   2. 기본 스타일 (Base)
   ---------------------------------------------------------------------------- */
body {
    font-family: var(--g-font-family);
    font-size: var(--g-font);
    line-height: var(--g-line);
}

button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

#main {
    margin: 0 auto;
    padding: 0 0 50px;
    width: 100%;
}

/* ----------------------------------------------------------------------------
   3. 제목 영역
   ---------------------------------------------------------------------------- */
#title {
    border-color: var(--c-gray-light);
    margin: 0 auto;
    max-width: var(--g-max-width);
    padding: 20px 0;
    text-align: center;
    width: 95%;
}

#title h2 {
    font-size: var(--g-font-h2);
    font-weight: 700;
}

.title2 {
    background-color: var(--c-white);
    border-left: 10px solid var(--c-gray-light);
    box-shadow: var(--shadow-light);
    box-sizing: border-box;
    font-size: var(--g-font-h3);
    margin: 10px auto;
    max-width: var(--g-max-width);
    padding: 30px 10px;
    width: 98%;
}

.title_color {
    margin-left: 10px;
    white-space: nowrap;
}

/* ----------------------------------------------------------------------------
   4. 페이지 진행바 (Pagebar)
   ---------------------------------------------------------------------------- */
.pagebar {
    background: var(--c-gray-light);
    border-radius: 5px;
    height: 10px;
    margin: 0 auto;
    max-width: var(--g-max-width);
    padding: 0;
    position: relative;
    width: 98%;
}

.pagebar span {
    border-radius: 5px;
    display: block;
    height: 10px;
    position: absolute;
    width: 20%;
}

.pagebar span::before {
    border-radius: 50%;
    content: "";
    height: 15px;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 15px;
}

.pagebar .num {
    font-size: var(--g-font);
    position: absolute;
    right: 0;
    top: -25px;
}

.num {
    font-weight: 600;
}

#tmp_line {
    border-bottom: 1px solid var(--c-gray-light);
    padding: 10px;
}

/* ----------------------------------------------------------------------------
   5. 카드 / 컨테이너
   ---------------------------------------------------------------------------- */
.container,
.card {
    border-bottom: 1px solid var(--c-gray-light);
    box-shadow: var(--shadow-light);
    margin: 10px auto;
    max-width: var(--g-max-width);
    padding: 30px 0;
    width: 98%;
}

.card-header {
    padding: 20px 0;
    text-align: center;
    word-break: keep-all;
}

.card-header h3 {
    font-size: var(--g-font-h3);
    margin-bottom: 15px;
}

.card-body {
    line-height: 30px;
    margin: 10px auto;
    width: 98%;
}

/* ----------------------------------------------------------------------------
   6. 버튼 영역
   ---------------------------------------------------------------------------- */
#button {
    border: none;
    border-radius: 16px;
    margin: 0 auto;
    max-width: var(--g-max-width);
    padding: 50px 0;
    width: 95%;
}

#button input {
    border-radius: 32px;
    font-weight: 600;
    height: 64px;
    width: 215px;
}

.prev,
.next,
.end {
    border: 1px solid;
    font: inherit;
}

.prev,
.next {
    margin-right: 10px;
}

.btnbox1:hover {
    cursor: pointer;
    padding: 0;
}

.bt-align {
    float: initial;
}

/* ----------------------------------------------------------------------------
   7. 폼 컨트롤 (Option Input, Select 등)
   ---------------------------------------------------------------------------- */
.option-input {
    appearance: none;
    background: var(--c-white);
    border: 1px solid;
    box-sizing: border-box;
    cursor: pointer;
    height: var(--g-input-height);
    margin: 0 2px 0 0;
    position: relative;
    transition: all .15s ease-out 0s;
    vertical-align: middle;
    width: var(--g-input-width);
    z-index: 10;
}

.option-input::before {
    content: "";
    font-size: var(--g-font);
    font-weight: 700;
    left: 50%;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
}

.option-input:checked::before {
    color: var(--c-white);
    content: "\f00c";
    font-family: "Font Awesome 5 Free";
}

.option-input:hover {
    background: var(--c-gray-light);
}

.radio {
    border-radius: 50%;
}

.rank-text {
    font-size: var(--g-font);
    font-weight: 700;
    height: var(--g-input-height);
    width: var(--g-input-width);
}

select {
    background: var(--c-gray-light);
    border: none;
    box-sizing: border-box;
    font-size: var(--g-font);
    height: 40px;
    margin: 5px;
    padding: 0 10px;
    width: 100%;
}

option {
    display: block;
    font-weight: 400;
    min-height: 1.2em;
    padding: 0 2px 1px;
    white-space: nowrap;
}

select option {
    background: var(--c-white);
}

#radio_text {
    width: 60%;
}

/* ----------------------------------------------------------------------------
   8. 텍스트 입력 필드
   ---------------------------------------------------------------------------- */
.celtxt,
.celnum {
    background: var(--c-gray-light);
    border: none;
    box-sizing: border-box;
    color: var(--c-gray-dark);
    font: inherit;
    height: 40px;
    margin: 2px;
    padding: 0 10px;
    width: 100%;
}

.cellab {
    background-color: var(--theme-color, #f1383c);
    color: var(--c-white);
}

.ut_dk {
    border: 0;
    width: 48%;
}

#content .table_ut.text table .total input {
    margin-right: 20px;
    width: 330px;
}

/* ----------------------------------------------------------------------------
   9. Outline 스타일
   ---------------------------------------------------------------------------- */
.outline,
.outline-x {
    border-radius: 16px;
    box-sizing: border-box;
    display: block;
    margin-bottom: 10px;
    width: 100%;
}

.outline {
    border: 1px solid var(--c-gray-medium);
    line-height: 80px;
    padding: 0 15px;
}

.label_u .outline,
.table_ut .outline,
.outline-x {
    border: 0 solid var(--c-gray-medium);
    line-height: 30px;
    text-align: left;
}

.hard_style {
    margin-right: 1em;
}

/* ----------------------------------------------------------------------------
   10. Alert 스타일
   ---------------------------------------------------------------------------- */
.alert {
    border: 1px solid;
    border-radius: 10px;
    display: flex;
    line-height: 50px;
}

.ms_line::before {
    display: block;
}

.ms_line_none::before {
    display: none;
}

/* ----------------------------------------------------------------------------
   11. 그리드 레이아웃 (Row, Col)
   ---------------------------------------------------------------------------- */
.row {
    display: flex;
    flex-wrap: wrap;
}

.col-sm-12,
.col-sm-6,
.col-sm-4,
.col-sm-3,
.col-sm-2 {
    border: 0 solid var(--c-gray-medium);
    border-radius: 16px;
    box-sizing: border-box;
}

.col-sm-6,
.col-sm-4,
.col-sm-3,
.col-sm-2 {
    margin-right: 1%;
}

.col-sm-12 {
    width: 100%;
}

.col-sm-6 {
    width: 49%;
}

.col-sm-4 {
    width: 32.3%;
}

.col-sm-3 {
    width: 24%;
}

.col-sm-2 {
    width: 15.6%;
}

/* ----------------------------------------------------------------------------
   12. 테이블 스타일
   ---------------------------------------------------------------------------- */

/* 기본 테이블 */
.table-outline {
    background-color: var(--c-white);
    border-collapse: collapse;
    border-right: 1px solid var(--c-border);
    border-top: 1px solid var(--c-border);
}

.table-outline th {
    background-color: var(--c-background);
    color: #323232;
}

.table-outline th,
.table-outline td {
    border-bottom: 1px solid var(--c-border);
    border-left: 1px solid var(--c-border);
    padding: 5px;
    text-align: center;
    vertical-align: middle;
}

/* table_ms (매트릭스 테이블) */
.table_ms {
    border: 1px solid var(--c-gray-medium);
    border-collapse: separate;
    border-radius: 16px;
    margin-bottom: 10px;
    overflow: hidden;
    table-layout: fixed;
    text-align: center;
    width: 100%;
}

.table_ms .option-input {
    margin: 0;
}

.table_ms tbody .option-input {
    background: var(--c-white);
    border: 2px solid;
    margin-top: 0;
}

.table_ms tbody td {
    padding: 20px;
    position: relative;
    vertical-align: middle;
}

.table_ms tbody th {
    color: var(--c-white);
    font-size: 20px;
    line-height: 30px;
    padding: 10px;
    vertical-align: middle;
}

.table_ms td::before {
    content: "";
    height: 2px;
    left: 50%;
    position: absolute;
    top: 50%;
    width: 100%;
}

/* table_ut (유틸리티 테이블) */
.table_ut {
    border: 1px solid var(--c-gray-medium);
    border-collapse: separate;
    border-radius: 16px;
    margin-bottom: 10px;
    overflow: hidden;
    table-layout: fixed;
    text-align: center;
    width: 100%;
}

.table_ut tbody td {
    border: 1px solid var(--c-gray-light);
    padding: 15px;
    vertical-align: middle;
}

.table_ut tbody th {
    border: .1px solid #ffffff90;
    color: var(--c-white);
    line-height: 150%;
    padding: 10px 15px;
    vertical-align: middle;
}

.table_ut tbody tr {
    height: 70px;
}

.table_ut tbody tr td div {
    border: none;
    margin: 0;
}

.table_ut td .row .col-sm-12 {
    border: none;
}

.table_ut.text table {
    margin: 0;
}

.table_ut.text table td {
    border: 1px solid var(--c-gray-light);
    padding: 15px;
}

/* 테이블 내 작은 컨트롤 */
.outline-x .option-input,
.label_u .option-input,
.table_ut .option-input {
    font-size: var(--g-input-small-font);
    height: var(--g-input-small-height);
    width: var(--g-input-small-width);
}

.table_ut .option-input::before {
    font-size: var(--g-font);
    font-weight: 700;
    left: 50%;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
}

/* ----------------------------------------------------------------------------
   13. 공지사항 (Top Board)
   ---------------------------------------------------------------------------- */
#top_board ul {
    border: 0 solid var(--c-gray-medium);
    border-radius: 16px;
    display: flex;
    padding: 30px 0;
}

#top_board li {
    border-right: 1px solid var(--c-gray-medium);
    flex: 1 1 40%;
    padding-left: 70px;
    position: relative;
}

#top_board li:last-child {
    border: none;
}

#top_board li i {
    color: var(--c-gray-dark);
    font-size: 40px;
    left: 0;
    padding-left: 20px;
    position: absolute;
}

#top_board li p {
    font-size: 18px;
}

#top_board li span {
    color: var(--c-gray-dark);
    font-size: 14px;
}

.mo_cont {
    display: none;
}

.pc_cont {
    display: block;
}

/* ----------------------------------------------------------------------------
   14. 스킨 버튼
   ---------------------------------------------------------------------------- */
.skin-btn {
    bottom: 20px;
    padding-bottom: 50px;
    position: fixed;
    right: 20px;
    width: 50px;
    z-index: 9999;
}

.skin-btn .skin-btn-container {
    display: none;
}

.skin-btn .skin-btn-container.on {
    display: block;
}

.skin-btn .skin-menu {
    background: var(--c-white);
    border-radius: 50%;
    bottom: 0;
    box-shadow: 1px 1px 8px rgb(0 0 0 / 10%);
    cursor: pointer;
    height: 50px;
    left: 0;
    line-height: 54px;
    position: absolute;
    text-align: center;
    width: 50px;
}

.skin-btn .skin-menu i {
    font-size: 26px;
}

.skin-btn button {
    border-radius: 50%;
    display: inline-block;
    font-size: 0;
    height: 30px;
    margin: 5px;
    width: 30px;
}

/* ============================================================================
   반응형 스타일 (Media Queries)
   ============================================================================ */

/* ----------------------------------------------------------------------------
   모바일 (max-width: 1199px)
   ---------------------------------------------------------------------------- */
@media (max-width: 1199px) {
    /* CSS 변수 재정의 */
    :root {
        --g-font-h1: 2rem;
        --g-font-h2: 1.8rem;
        --g-font-h3: 1.4rem;
        --g-font: 1rem;
        --g-input-width: 30px;
        --g-input-height: 30px;
    }

    body {
        font-size: 1rem;
        line-height: 1.2;
    }

    /* 제목 */
    #title {
        border: none;
        width: 100%;
    }

    .title2 {
        width: 100%;
    }

    /* 페이지바 */
    .pagebar {
        width: 100%;
    }

    #tmp_line {
        display: none;
    }

    /* 카드 */
    .card-header {
        padding: 15px 0;
    }

    .card {
        border-bottom: 1px solid var(--c-gray-light);
        box-sizing: border-box;
        margin: 10px auto;
        width: 100%;
    }

    .card-body {
        line-height: 30px;
        width: 98%;
    }

    /* Outline */
    .outline {
        border-radius: 0;
        line-height: 60px;
        margin-bottom: 5px;
    }

    /* 버튼 */
    #button input {
        height: 50px;
        width: 150px;
    }

    /* 텍스트 입력 */
    .celtxt,
    .celnum {
        margin: 0;
    }

    /* 그리드 */
    .col-sm-12 {
        flex: none;
        line-height: 30px;
        margin: 0 0 5px;
        width: 100%;
    }

    /* 테이블 */
    .table_ms {
        border-radius: 0;
    }

    .table_ms td::before {
        top: 45%;
    }

    .table_ms tbody td {
        padding: 0;
    }

    .table_ut {
        border-radius: 0;
    }

    /* 공지사항 */
    #top_board .container {
        border: 1px solid var(--c-gray-light);
        box-shadow: var(--shadow-medium);
        box-sizing: border-box;
        padding: 5px;
        width: 100%;
    }

    #top_board .tab_cont {
        clear: both;
        font-size: 18px;
        padding: 20px 0;
        text-align: center;
    }

    #top_board .tab_cont div {
        display: none;
    }

    #top_board .tab_cont div.on {
        display: block;
    }

    #top_board .tab_title li {
        background: var(--c-gray-light);
        cursor: pointer;
        overflow: hidden;
        padding: 10px 0;
        text-align: center;
    }

    #top_board .tab_title li i {
        font-size: 18px;
        padding: 0;
        position: static;
        vertical-align: middle;
    }

    #top_board .tab_title li span {
        font-size: 16px;
    }

    #top_board .tab_title li.on i,
    #top_board .tab_title li.on span {
        color: var(--c-white);
    }

    #top_board li span {
        vertical-align: middle;
    }

    #top_board ul {
        overflow: hidden;
        padding: 0;
    }

    .mo_cont {
        display: block;
    }

    .pc_cont {
        display: none;
    }
}

/* ----------------------------------------------------------------------------
   소형 모바일 (max-width: 480px)
   ---------------------------------------------------------------------------- */
@media screen and (max-width: 480px) {
    .col-sm-6 {
        margin-right: 0;
        width: 100%;
    }

    .table_ms tbody td {
        padding: 0;
    }
}

/* ----------------------------------------------------------------------------
   터치 디바이스
   ---------------------------------------------------------------------------- */
@media screen and (hover: none) and (pointer: coarse) {
    .alert {
        line-height: 40px;
    }
}
