/* ========================================
   보호글 비밀번호 모달
   ======================================== */

.protected-modal {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: none;
    align-items: center;
    justify-content: center;
}

.protected-modal.active {
    display: flex;
}

/* 모달 오버레이 */
.protected-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

/* 모달 컨텐츠 */
.protected-modal-content {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 20px;
    background: var(--quantum-bg-primary);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: protectedModalSlideUp 0.3s ease;
}

@keyframes protectedModalSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 모달 헤더 */
.protected-modal-header {
    padding: 32px 24px 24px;
    text-align: center;
}

.protected-modal-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    background: var(--quantum-point-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.protected-modal-icon [data-lucide] {
    width: 28px;
    height: 28px;
    color: var(--quantum-point);
}

.protected-modal-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--quantum-text-primary);
    margin: 0 0 8px;
}

.protected-modal-header p {
    font-size: 14px;
    color: var(--quantum-text-secondary);
    margin: 0;
}

/* 모달 바디 */
.protected-modal-body {
    padding: 0 24px 32px;
}

#protected-modal-password {
    width: 100%;
    height: 52px;
    padding: 0 16px;
    border: 1px solid var(--quantum-border-medium);
    border-radius: 12px;
    font-size: 16px;
    color: var(--quantum-text-primary);
    background: var(--quantum-bg-primary);
    margin-bottom: 16px;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#protected-modal-password::placeholder {
    color: var(--quantum-text-tertiary);
}

#protected-modal-password:focus {
    outline: none;
    border-color: var(--quantum-point);
    box-shadow: inset 0 0 0 1px var(--quantum-point);
}

#protected-modal-password.error {
    border-color: var(--quantum-danger);
    box-shadow: inset 0 0 0 1px var(--quantum-danger);
    animation: protectedShake 0.4s ease;
}

@keyframes protectedShake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-8px); }
    40%, 80% { transform: translateX(8px); }
}

/* 확인 버튼 */
#protected-submit-btn {
    width: 100%;
    height: 52px;
    border: none;
    border-radius: 12px;
    background: var(--quantum-point);
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

#protected-submit-btn:hover {
    background: var(--quantum-point-hover);
}

#protected-submit-btn:active {
    transform: scale(0.98);
}

/* 닫기 버튼 */
.protected-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: none;
    background: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.protected-modal-close [data-lucide] {
    width: 20px;
    height: 20px;
    color: var(--quantum-text-tertiary);
}

.protected-modal-close:hover {
    background: var(--quantum-bg-tertiary);
}

.protected-modal-close:hover [data-lucide] {
    color: var(--quantum-text-secondary);
}

/* ========================================
   반응형
   ======================================== */

@media (max-width: 480px) {
    .protected-modal-content {
        margin: 16px;
        border-radius: 12px;
    }

    .protected-modal-header {
        padding: 24px 20px 20px;
    }

    .protected-modal-body {
        padding: 0 20px 24px;
    }

    .protected-modal-icon {
        width: 56px;
        height: 56px;
    }

    .protected-modal-icon [data-lucide] {
        width: 24px;
        height: 24px;
    }

    .protected-modal-header h3 {
        font-size: 18px;
    }

    #protected-modal-password,
    #protected-submit-btn {
        height: 48px;
    }
}
