/**
 * 비밀번호 만료 모달 스타일
 * @author 정보전산원
 * @since 2026.01.27
 * @version 1.0
 */

/* 모달 오버레이 */
.pwd-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.pwd-modal-overlay.active {
    display: flex;
}

/* 모달 컨테이너 */
.pwd-modal {
    position: relative;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 420px;
    max-height: 90vh;
    overflow: hidden;
    animation: pwdModalSlideIn 0.3s ease;
}

@keyframes pwdModalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 모달 헤더 */
.pwd-modal-header {
    background: linear-gradient(135deg, #014099 0%, #0056b3 100%);
    color: #fff;
    padding: 18px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pwd-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.pwd-modal-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.pwd-modal-close:hover {
    opacity: 1;
}

/* 모달 바디 */
.pwd-modal-body {
    padding: 25px;
}

/* 경고 메시지 */
.pwd-warning-message {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    color: #856404;
    font-size: 14px;
    line-height: 1.5;
}

.pwd-warning-message strong {
    display: block;
    margin-bottom: 5px;
    font-size: 15px;
}

/* 경과일 표시 */
.pwd-days-info {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 20px;
    color: #721c24;
    font-size: 14px;
    text-align: center;
}

.pwd-days-info .days {
    font-size: 24px;
    font-weight: bold;
    color: #dc3545;
}

/* 입력 필드 */
.pwd-input-group {
    margin-bottom: 15px;
}

.pwd-input-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.pwd-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.pwd-input:focus {
    outline: none;
    border-color: #014099;
    box-shadow: 0 0 0 3px rgba(1, 64, 153, 0.1);
}

.pwd-input.error {
    border-color: #dc3545;
}

/* 비밀번호 규칙 */
.pwd-rules {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 12px 15px;
    margin-top: 15px;
    font-size: 12px;
    color: #666;
}

.pwd-rules ul {
    margin: 0;
    padding-left: 18px;
}

.pwd-rules li {
    margin-bottom: 4px;
}

.pwd-rules li.valid {
    color: #28a745;
}

.pwd-rules li.invalid {
    color: #dc3545;
}

/* 에러 메시지 */
.pwd-error {
    color: #dc3545;
    font-size: 13px;
    margin-top: 10px;
    display: none;
}

.pwd-error.show {
    display: block;
}

/* 모달 푸터 */
.pwd-modal-footer {
    padding: 15px 25px 25px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* 버튼 스타일 */
.pwd-btn {
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.pwd-btn-primary {
    background: linear-gradient(135deg, #014099 0%, #0056b3 100%);
    color: #fff;
}

.pwd-btn-primary:hover {
    background: linear-gradient(135deg, #013080 0%, #004999 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(1, 64, 153, 0.3);
}

.pwd-btn-primary:disabled {
    background: #adb5bd;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.pwd-btn-secondary {
    background: #6c757d;
    color: #fff;
}

.pwd-btn-secondary:hover {
    background: #5a6268;
}

.pwd-btn-outline {
    background: #fff;
    color: #014099;
    border: 1px solid #014099;
}

.pwd-btn-outline:hover {
    background: #f8f9fa;
}

/* 로딩 스피너 */
.pwd-loading {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 10;
}

.pwd-loading.active {
    display: flex;
}

.pwd-loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #014099;
    border-radius: 50%;
    animation: pwdSpin 1s linear infinite;
}

@keyframes pwdSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.pwd-loading p {
    margin-top: 15px;
    color: #333;
    font-size: 14px;
}

/* 비밀번호 강도 표시 */
.pwd-strength {
    margin-top: 8px;
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
}

.pwd-strength-bar {
    height: 100%;
    width: 0;
    transition: width 0.3s, background-color 0.3s;
}

.pwd-strength-bar.weak {
    width: 33%;
    background: #dc3545;
}

.pwd-strength-bar.medium {
    width: 66%;
    background: #ffc107;
}

.pwd-strength-bar.strong {
    width: 100%;
    background: #28a745;
}

.pwd-strength-text {
    font-size: 11px;
    margin-top: 4px;
    color: #666;
}

/* 반응형 */
@media (max-width: 480px) {
    .pwd-modal {
        width: 95%;
        max-height: 95vh;
    }

    .pwd-modal-body {
        padding: 20px 15px;
    }

    .pwd-modal-footer {
        padding: 15px;
        flex-direction: column;
    }

    .pwd-btn {
        width: 100%;
        justify-content: center;
    }
}
