/* ========================================
   노트 열기 설정 모달 CSS
   Created: 2026-03-16
   목적: 사용자가 노트 열기 방식을 설정할 수 있는 UI
   ======================================== */

/* ===== 설정 모달 배경 ===== */
.note-settings-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 10000;
    display: none;
    animation: fadeIn 0.2s ease-out;
}

.note-settings-overlay.show {
    display: block;
}

/* ===== 설정 모달 컨테이너 ===== */
.note-settings-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 650px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 10001;
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease-out;
}

.note-settings-modal.show {
    display: flex;
}

/* ===== 설정 모달 헤더 ===== */
.settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #E5E5E5;
    background: #FAFAFA;
}

.settings-header h3 {
    margin: 0;
    font-size: 20px;
    color: #171717;
    font-weight: 600;
}

.settings-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 1px solid #E5E5E5;
    border-radius: 8px;
    cursor: pointer;
    font-size: 24px;
    color: #737373;
    transition: all 0.2s;
}

.settings-close:hover {
    background: #FEE2E2;
    border-color: #FCA5A5;
    color: #DC2626;
}

/* ===== 설정 모달 본문 ===== */
.settings-body {
    padding: 30px 24px;
    max-height: 60vh;
    overflow-y: auto;
}

.setting-group {
    margin-bottom: 30px;
}

.setting-group:last-child {
    margin-bottom: 0;
}

.setting-label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #171717;
    margin-bottom: 16px;
}

.setting-description {
    font-size: 14px;
    color: #737373;
    margin-top: 8px;
    line-height: 1.5;
}

/* ===== 설정 옵션 (라디오 버튼 카드) ===== */
.setting-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.setting-option {
    position: relative;
    cursor: pointer;
}

.setting-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.option-card {
    padding: 20px 16px;
    border: 2px solid #E5E5E5;
    border-radius: 12px;
    text-align: center;
    transition: all 0.2s;
    background: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    min-height: 140px;
}

.option-card:hover {
    border-color: #1E3A8A;
    background: #F5F8FF;
}

.setting-option input:checked + .option-card {
    border-color: #1E3A8A;
    background: #DBEAFE;
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.15);
}

.option-card .icon {
    width: 40px;
    height: 40px;
    color: #737373;
    transition: color 0.2s;
}

.setting-option input:checked + .option-card .icon {
    color: #1E3A8A;
}

.option-title {
    font-size: 16px;
    font-weight: 600;
    color: #171717;
}

.option-desc {
    font-size: 13px;
    color: #737373;
    line-height: 1.4;
}

.setting-option input:checked + .option-card .option-title {
    color: #1E3A8A;
}

/* ===== 설정 모달 푸터 ===== */
.settings-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid #E5E5E5;
    background: #FAFAFA;
}

.btn-cancel,
.btn-save {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cancel {
    background: white;
    color: #737373;
    border: 1px solid #E5E5E5;
}

.btn-cancel:hover {
    background: #F5F5F5;
    border-color: #D1D5DB;
}

.btn-save {
    background: #1E3A8A;
    color: white;
}

.btn-save:hover {
    background: #1E40AF;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.3);
}

/* ===== 메뉴 구분선 ===== */
.menu-divider {
    height: 1px;
    background: #E5E5E5;
    margin: 6px 0;
}

/* ===== 반응형 (태블릿) ===== */
@media (max-width: 768px) {
    .note-settings-modal {
        width: 95%;
        max-width: none;
    }
    
    .setting-options {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .option-card {
        min-height: auto;
        padding: 16px;
    }
}

/* ===== 애니메이션 ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translate(-50%, -45%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}
