/* ============================
   Modal Container 공통
============================ */
.cookie-modal-wrap {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.cookie-modal {
    background: #fff;
    width: 500px;
    max-width: 90%;
    max-height: 85vh;
    overflow-y: auto;    
    padding: 25px;
    border-radius: 8px;
}

.modal-container {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    box-sizing: border-box;
}

.size-1120-p60 {
    width: 60%;
    max-width: 1120px;
    min-width: 420px;
}

/* 모바일 대응 */
@media (max-width:768px){
    .size-1120-p60 {
        width: 90%;
        min-width: auto;
    }
    .cookie-modal {
        width: 90%;
        max-height: 80vh;
        padding: 20px;
    }
}

/* ============================
   제목 및 설명
============================ */
.cookie-title {
    font-size: 1.8rem;
    line-height: 4rem;
    font-weight: 600;
    color: #111;
    text-align: start;
    margin-bottom: 20px;
    border-bottom: 2px solid #333333;
    padding-bottom: 10px;
}

.cookie-modal p {
    font-size: 1.1rem;
    line-height: 2.1rem;
    font-weight: 400;
    color: #444;
    margin-bottom: 20px;
}

/* ============================
   버튼 영역
============================ */
.cookie-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.cookie-buttons button {
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    line-height: 1.5rem;
    font-weight: 800;
}

.btn-setting {
    background: #e2e8f0;
    color: #111;
}

.btn-all-agree {
    background: #c62828;
    color: #ffffff;
}

.btn-all-agree:hover {
    background: #b71c1c;
}

.cookie-confirm-area {
    text-align: center;
    margin-top: 25px;
}

.btn-confirm {
    background: #c62828;
    color: #fff;
    border: none;
    padding: 12px 40px;
    border-radius: 4px;
    font-size: 15px;
    cursor: pointer;
}

.btn-confirm:hover {
    background: #b71c1c;
}

/* ============================
   쿠키 항목 (필수/분석/마케팅)
============================ */
.cookies-setting-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 44px;
    border-bottom: 1px solid #e3dada;
    padding-bottom: 8px;
    margin-bottom: 10px;
}

.cookies-tit {
    font-size: 1.2rem;
    line-height: 3rem;
    font-weight: 600;
    color: #111;
}

.right-area {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.plus-btn {
    cursor: pointer;
    font-size: 18px;
    width: 20px;
    text-align: center;
    color: #c62828;
    font-weight: bold;
}

/* ============================
   스위치 토글
============================ */
.switch-inner {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch-inner input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-item {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #ccc;
    border-radius: 20px;
    transition: .3s;
}

.switch-item:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: .3s;
}

.switch-inner input:checked + .switch-item {
    background: #c62828;
}

.switch-inner input:disabled + .switch-item {
    background: #bbb;
    cursor: not-allowed;
}

.switch-inner input:checked:disabled + .switch-item {
    background: #c62828;
    opacity: 0.85;
}

.switch-inner input:checked + .switch-item:before {
    transform: translateX(26px);
}

/* ============================
   Collapse (열림/닫힘)
============================ */
.collapse-content {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.4s ease;
}

.collapse-content.open {
    max-height: 1000px;  
    opacity: 1;
}

.collapse-inner {
    display: block; /* 테이블 레이아웃 안정화 */
}

.collapse-content.open .collapse-inner {
    transform: translateY(0);
}

/* ============================
   테이블
============================ */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    scrollbar-gutter: stable; /* 스크롤바 공간 항상 확보 */
}

.table-responsive .cookie-table {
    min-width: 600px;
}

.cookie-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    table-layout: fixed;
    font-size: 13px;
    min-width: 600px;
}

.cookie-table th,
.cookie-table td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: center;
    vertical-align: middle;
    word-break: break-word;
}

.cookie-table th {
    background: #f5f5f5;
    font-weight: 700;
    font-size: 1.0rem;
    line-height: 2.8rem;
}

.cookie-table td {
    font-size: 0.8rem;
    line-height: 1.5rem;
}

.cookie-table tr:nth-child(even) {
    background: #fafafa;
}

/* 모바일 대응 */
@media (max-width:768px){
    .cookie-title {
        font-size: 1.5rem;
        line-height: 2.5rem;
    }
    .collapse-inner {
        font-size: 0.95rem;
        line-height: 2rem;
    }
    .cookie-table th,
    .cookie-table td {
        font-size: 0.9rem;
        line-height: 2rem;
    }
    .cookie-buttons button,
    .btn-confirm {
        padding: 10px 20px;
        font-size: 0.75rem;
    }
    .cookies-tit {
        font-size: 1rem;
        line-height: 2.5rem;
    }
    .plus-btn {
        font-size: 16px;
    }
}

