/* ═══════════════════════════════════════════════
   창고 이용 동의서 모달 (개인정보 + 홍보)
   Ver 1.0.0 · 2026-04-21 · 모바일 우선
   ═══════════════════════════════════════════════ */

.sc-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(30, 25, 20, 0.65);
    z-index: 10050;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
    backdrop-filter: blur(3px);
}
.sc-overlay.show {
    display: flex;
    animation: scFade 0.2s ease;
}
@keyframes scFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes scSlideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.sc-modal {
    background: #fff;
    border-radius: 22px 22px 0 0;
    width: 100%;
    max-width: 560px;
    max-height: 94vh;
    overflow-y: auto;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.3);
    animation: scSlideUp 0.3s ease;
}
@media (min-width: 768px) {
    .sc-overlay { align-items: center; padding: 20px; }
    .sc-modal { border-radius: 18px; }
}

.sc-head {
    padding: 20px 22px 18px;
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    border-bottom: 1px solid #a5d6a7;
    position: sticky; top: 0; z-index: 2;
}
.sc-grab {
    width: 42px; height: 4px;
    background: #81c784; border-radius: 2px;
    margin: 0 auto 12px;
}
@media (min-width: 768px) { .sc-grab { display: none; } }
.sc-title {
    display: flex; align-items: center; gap: 8px;
    font-size: 18px; font-weight: 800;
    color: #1b5e20;
}
.sc-title-ic { font-size: 22px; }
.sc-sub {
    font-size: 12px; color: #2e7d32;
    margin-top: 6px;
    line-height: 1.6;
}

.sc-body { padding: 18px 22px 20px; }

.sc-purpose {
    background: #f1f8e9;
    border: 1.5px solid #c5e1a5;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 16px;
    font-size: 12.5px;
    line-height: 1.8;
    color: #33691e;
}
.sc-purpose b { color: #1b5e20; }
.sc-purpose .sc-hl {
    display: inline-block;
    background: #c5e1a5;
    color: #1b5e20;
    font-weight: 800;
    padding: 1px 7px;
    border-radius: 6px;
    margin: 0 2px;
}

/* 아코디언 동의서 카드 */
.sc-agree-card {
    background: #fff;
    border: 1.5px solid #e0e0e0;
    border-radius: 12px;
    margin-bottom: 10px;
    overflow: hidden;
    transition: border-color 0.15s;
}
.sc-agree-card.checked {
    border-color: #66bb6a;
    background: #f9fff9;
}
.sc-agree-head {
    display: flex; align-items: center;
    gap: 10px; padding: 12px 14px;
    cursor: pointer;
    user-select: none;
}
.sc-checkbox {
    width: 22px; height: 22px;
    border: 2px solid #bdbdbd;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: #fff;
    transition: all 0.15s;
}
.sc-agree-card.checked .sc-checkbox {
    background: linear-gradient(135deg, #66bb6a, #43a047);
    border-color: #43a047;
}
.sc-checkbox::after {
    content: '';
    display: none;
    width: 10px; height: 6px;
    border-left: 2.5px solid #fff;
    border-bottom: 2.5px solid #fff;
    transform: rotate(-45deg) translateY(-2px);
}
.sc-agree-card.checked .sc-checkbox::after { display: block; }

.sc-agree-title-wrap {
    flex: 1; min-width: 0;
}
.sc-agree-title {
    font-size: 13px; font-weight: 800;
    color: #212121;
}
.sc-agree-req {
    display: inline-block;
    font-size: 9px; font-weight: 800;
    padding: 1px 6px;
    border-radius: 5px;
    background: #ffe0b2;
    color: #e65100;
    margin-left: 6px;
    letter-spacing: 0.04em;
}
.sc-agree-sub {
    font-size: 10px; color: #757575;
    margin-top: 2px;
}
.sc-agree-toggle {
    font-size: 11px;
    color: #1976d2;
    font-weight: 700;
    flex-shrink: 0;
    padding: 4px 10px;
    border-radius: 14px;
    background: #e3f2fd;
    transition: background 0.15s;
}
.sc-agree-toggle:hover { background: #bbdefb; }
.sc-agree-toggle::before { content: '자세히 ▾'; }
.sc-agree-card.expanded .sc-agree-toggle::before { content: '접기 ▴'; }

.sc-agree-body {
    display: none;
    padding: 0 16px 16px;
    border-top: 1px dashed #e0e0e0;
    margin-top: 2px;
    padding-top: 12px;
}
.sc-agree-card.expanded .sc-agree-body { display: block; animation: scFade 0.2s ease; }

.sc-agree-body h4 {
    font-size: 12px; font-weight: 800;
    color: #37474f; margin: 10px 0 4px;
}
.sc-agree-body h4:first-child { margin-top: 0; }
.sc-agree-body p, .sc-agree-body ul {
    font-size: 11.5px;
    line-height: 1.75;
    color: #455a64;
}
.sc-agree-body ul { padding-left: 18px; margin-bottom: 6px; }
.sc-agree-body li { margin-bottom: 3px; }
.sc-agree-body table {
    width: 100%;
    font-size: 11px;
    border-collapse: collapse;
    margin: 6px 0;
}
.sc-agree-body th, .sc-agree-body td {
    border: 1px solid #e0e0e0;
    padding: 6px 8px;
    text-align: left;
    color: #455a64;
}
.sc-agree-body th {
    background: #eceff1;
    font-weight: 700;
    color: #263238;
}

/* 전체 동의 */
.sc-all-row {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 14px;
    background: #fff8e1;
    border: 1.5px solid #ffca28;
    border-radius: 10px;
    margin: 14px 0 12px;
    cursor: pointer;
    user-select: none;
}
.sc-all-row.checked {
    background: #fffde7;
    border-color: #ffb300;
}
.sc-all-label {
    font-size: 13px; font-weight: 800;
    color: #5d4037;
    flex: 1;
}
.sc-all-sub {
    font-size: 10px; color: #8d6e63;
    margin-top: 2px;
}

.sc-skip-row {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 12px;
    font-size: 11px;
    color: #616161;
    cursor: pointer;
    user-select: none;
}
.sc-skip-check {
    width: 16px; height: 16px;
    border: 2px solid #bdbdbd;
    border-radius: 4px;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.sc-skip-row.checked .sc-skip-check {
    background: #757575;
    border-color: #757575;
}
.sc-skip-row.checked .sc-skip-check::after {
    content: ''; width: 8px; height: 4px;
    border-left: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(-45deg) translateY(-1px);
}

.sc-actions {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 10px;
    margin-top: 14px;
}
.sc-btn {
    padding: 14px;
    border: none; border-radius: 12px;
    font-size: 14px; font-weight: 800;
    cursor: pointer; font-family: inherit;
    transition: transform 0.1s, box-shadow 0.15s;
}
.sc-btn-cancel {
    background: #eceff1; color: #546e7a;
}
.sc-btn-cancel:hover { background: #cfd8dc; }
.sc-btn-ok {
    background: linear-gradient(135deg, #66bb6a, #43a047);
    color: #fff;
    box-shadow: 0 3px 10px rgba(76, 175, 80, 0.35);
}
.sc-btn-ok:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(76, 175, 80, 0.45);
}
.sc-btn-ok:disabled {
    background: #cfd8dc;
    color: #90a4ae;
    cursor: not-allowed;
    box-shadow: none;
}

.sc-already {
    display: none;
    margin-top: 10px;
    padding: 10px 14px;
    background: #e8f5e9;
    border-left: 4px solid #43a047;
    border-radius: 6px;
    font-size: 11px; color: #2e7d32;
    line-height: 1.5;
}
.sc-already.show { display: block; }

/* 모바일 세밀 조정 */
@media (max-width: 768px) {
    .sc-title { font-size: 16px; }
    .sc-purpose { font-size: 12px; padding: 12px 14px; line-height: 1.75; }
    .sc-agree-title { font-size: 12.5px; }
    .sc-agree-body p, .sc-agree-body ul { font-size: 11px; line-height: 1.7; }
    .sc-btn { padding: 12px; font-size: 13px; }
}
