/**
 * Planc Members 프론트엔드 스타일
 */

/* ==================== 통합 모달 기본 ==================== */
.planc-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
}

.planc-modal.show {
    display: block;
}

.planc-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.planc-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 480px;
    max-height: 90vh;
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -48%);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* ==================== 모달 헤더 ==================== */
.planc-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    min-height: 24px;
}

.planc-modal-back,
.planc-modal-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #4E5968;
    transition: color 0.2s ease;
}

.planc-modal-back:hover,
.planc-modal-close:hover {
    color: #191F28;
}

.planc-modal-close {
    margin-left: auto;
}

/* ==================== 모달 뷰 전환 ==================== */
.planc-modal-view {
    animation: viewFadeIn 0.25s ease;
}

@keyframes viewFadeIn {
    from {
        opacity: 0;
        transform: translateX(10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.planc-modal-title {
    font-size: 24px;
    font-weight: 700;
    color: #191F28;
    text-align: center;
    margin-bottom: 32px;
    letter-spacing: -0.02em;
}

/* ==================== 모달 폼 ==================== */
.planc-modal-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.planc-modal-form .planc-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.planc-modal-form label {
    font-size: 14px;
    font-weight: 500;
    color: #4E5968;
}

.planc-modal-form label .required {
    color: #DC2626;
    margin-left: 2px;
}

.planc-modal-form input {
    width: 100%;
    height: 52px;
    padding: 0 16px;
    border: 1px solid #E5E8EB;
    border-radius: 8px;
    font-size: 15px;
    color: #191F28;
    background: #fff;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.planc-modal-form input:focus {
    outline: none;
    border-color: #2F75FF;
}

.planc-modal-form input::placeholder {
    color: #B0B8C1;
}

/* ==================== 입력 필드 + 버튼 조합 ==================== */
.planc-input-with-btn {
    display: flex;
    gap: 8px;
}

.planc-input-with-btn input {
    flex: 1;
}

.planc-check-btn {
    flex-shrink: 0;
    padding: 0 16px;
    height: 52px;
    background: #4E5968;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
    white-space: nowrap;
}

.planc-check-btn:hover {
    background: #3D4654;
}

.planc-check-btn:disabled {
    background: #B0B8C1;
    cursor: not-allowed;
}

/* ==================== 스텝 인디케이터 ==================== */
.planc-step-indicator {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 16px;
}

.planc-step-indicator .step {
    font-size: 13px;
    font-weight: 600;
    color: #B0B8C1;
    position: relative;
}

.planc-step-indicator .step.active {
    color: #191F28;
}

.planc-step-indicator .step.completed {
    color: #B0B8C1;
}

.planc-step-indicator .step::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: transparent;
}

.planc-step-indicator .step.active::after {
    background: #2F75FF !important;
}

.planc-step-indicator .step.completed::after {
    background: transparent !important;
}

/* ==================== 약관 동의 ==================== */
.planc-terms-container {
    margin-bottom: 24px;
}

.planc-term-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid #F2F4F6;
}

.planc-term-item:last-of-type {
    border-bottom: none;
}

.planc-checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.planc-checkbox {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.planc-checkbox-custom {
    width: 22px;
    height: 22px;
    border: 2px solid #D1D5DB;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.planc-checkbox:checked+.planc-checkbox-custom {
    background: #2F75FF;
    border-color: #2F75FF;
}

.planc-checkbox:checked+.planc-checkbox-custom::after {
    content: '';
    width: 6px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-bottom: 2px;
}

.term-text {
    font-size: 15px;
    color: #191F28;
}

.term-text .required {
    color: #DC2626;
    font-size: 13px;
}

.term-view-btn {
    background: none;
    border: none;
    color: #8B95A1;
    font-size: 13px;
    cursor: pointer;
    text-decoration: underline;
}

.term-view-btn:hover {
    color: #4E5968;
}

.planc-term-all {
    margin-top: 16px;
    padding: 16px;
    background: #F9FAFB;
    border-radius: 8px;
}

.term-text-all {
    font-size: 15px;
    font-weight: 600;
    color: #191F28;
}

/* ==================== 약관 내용 뷰 ==================== */
.planc-terms-content {
    max-height: 400px;
    overflow-y: auto;
    padding: 20px;
    background: #F9FAFB;
    border-radius: 8px;
    margin-bottom: 24px;
    font-size: 14px;
    line-height: 1.7;
    color: #4E5968;
}

/* ==================== 모달 링크 ==================== */
.planc-modal-links {
    margin-top: 24px;
    text-align: center;
    font-size: 14px;
    color: #4E5968;
}

.planc-modal-links a {
    color: #191F28;
    text-decoration: none;
    font-weight: 500;
}

.planc-modal-links a:hover {
    color: #3182F6;
}

.planc-modal-links .separator {
    margin: 0 12px;
    color: #E5E8EB;
}

/* ==================== 모달 소셜 로그인 ==================== */
.planc-modal-social {
    margin-top: 32px;
}

/* ==================== 회원가입 폼 스타일 ==================== */
.planc-register-form {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 8px;
}

.planc-register-form::-webkit-scrollbar {
    width: 4px;
}

.planc-register-form::-webkit-scrollbar-track {
    background: #F2F4F6;
    border-radius: 2px;
}

.planc-register-form::-webkit-scrollbar-thumb {
    background: #D1D5DB;
    border-radius: 2px;
}

/* ==================== 반응형 - 모달 ==================== */
@media (max-width: 640px) {
    .planc-modal-content {
        width: 95%;
        padding: 24px;
        max-height: 85vh;
    }

    .planc-modal-title {
        font-size: 20px;
        margin-bottom: 24px;
    }

    .planc-modal-form input {
        height: 48px;
        font-size: 14px;
    }

    .planc-check-btn {
        height: 48px;
        padding: 0 12px;
        font-size: 13px;
    }

    .planc-register-form {
        max-height: 320px;
    }
}

/* ==================== 폼 컨테이너 ==================== */
.planc-form-container {
    max-width: 500px;
    margin: 60px auto;
    padding: 48px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.planc-form-title {
    font-size: 28px;
    font-weight: 700;
    color: #191F28;
    text-align: center;
    margin-bottom: 32px;
    letter-spacing: -0.02em;
}

.planc-form-description {
    font-size: 14px;
    color: #4E5968;
    text-align: center;
    margin-bottom: 24px;
    line-height: 1.6;
}

/* ==================== 폼 그룹 ==================== */
.planc-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.planc-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.planc-form-group label {
    font-size: 14px;
    font-weight: 500;
    color: #4E5968;
}

.planc-form-group label .required {
    color: #DC2626;
}

/* ==================== 입력 필드 ==================== */
.planc-input-wrapper {
    position: relative;
    width: 100%;
}

.planc-input-wrapper input {
    width: 100%;
    height: 56px;
    padding: 0 16px;
    border: 1px solid #E5E8EB;
    border-radius: 8px;
    font-size: 15px;
    color: #191F28;
    background: #fff;
    transition: all 0.2s ease;
}

.planc-input-wrapper.has-icon input {
    padding-left: 48px;
}

.planc-input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #8B95A1;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.planc-input-wrapper input:focus {
    outline: none;
    border-color: #2F75FF;
}

.planc-input-wrapper input::placeholder {
    color: #B0B8C1;
}

/* ==================== 피드백 메시지 ==================== */
.planc-input-feedback {
    font-size: 13px;
    min-height: 18px;
}

.planc-input-feedback.success {
    color: #059669;
}

.planc-input-feedback.error {
    color: #DC2626;
}

/* ==================== 에러/성공 메시지 ==================== */
.planc-form-error {
    padding: 14px 16px;
    background: #FEF2F2;
    border: 1px solid #FECACA;
    border-radius: 8px;
    color: #DC2626;
    font-size: 14px;
    text-align: center;
}

.planc-form-success {
    padding: 14px 16px;
    background: #ECFDF5;
    border: 1px solid #A7F3D0;
    border-radius: 8px;
    color: #059669;
    font-size: 14px;
    text-align: center;
}

/* ==================== 버튼 ==================== */
.planc-submit-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 56px !important;
    min-height: 56px !important;
    flex-shrink: 0 !important;
    margin-top: 8px !important;
    background: #2F75FF !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    padding: 0 !important;
}

.planc-submit-btn:hover {
    background: #1B64DA;
}

.planc-submit-btn:disabled {
    background: #8B95A1;
    cursor: not-allowed;
}

.planc-submit-btn.loading {
    position: relative;
    color: transparent;
}

.planc-submit-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: planc-spin 0.8s linear infinite;
}

@keyframes planc-spin {
    to {
        transform: rotate(360deg);
    }
}

.planc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    padding: 0 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.planc-btn-outline {
    background: transparent;
    color: #4E5968;
    border: 1px solid #E5E8EB;
}

.planc-btn-outline:hover {
    background: #F9FAFB;
    color: #191F28;
}

/* ==================== 링크 ==================== */
.planc-form-links {
    margin-top: 24px;
    text-align: center;
    font-size: 14px;
    color: #4E5968;
}

.planc-form-links a {
    color: #191F28;
    text-decoration: none;
    font-weight: 500;
}

.planc-form-links a:hover {
    color: #3182F6;
}

.planc-form-links .separator {
    margin: 0 12px;
    color: #E5E8EB;
}

/* ==================== 소셜 로그인 ==================== */
.planc-social-login {
    margin-top: 32px;
}

.social-login-divider {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
}

.social-login-divider::before,
.social-login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #E5E8EB;
}

.social-login-divider span {
    padding: 0 16px;
    font-size: 13px;
    color: #8B95A1;
    white-space: nowrap;
}

.social-login-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.social-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.social-btn:hover {
    transform: translateY(-2px);
}

.social-btn svg {
    width: 48px;
    height: 48px;
    padding: 12px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.social-btn span {
    font-size: 12px;
    font-weight: 500;
    color: #4E5968;
}

.social-btn-naver svg {
    background: #03C75A;
    color: #fff;
}

.social-btn-kakao svg {
    background: #FEE500;
    color: #3C1E1E;
}

/* ==================== 마이페이지 ==================== */
.planc-mypage-container {
    max-width: 600px;
}

.planc-mypage-section {
    margin-bottom: 40px;
    padding-bottom: 32px;
    border-bottom: 1px solid #E5E8EB;
}

.planc-mypage-section:last-of-type {
    margin-bottom: 24px;
    padding-bottom: 0;
    border-bottom: none;
}

.planc-mypage-section h3 {
    font-size: 18px;
    font-weight: 600;
    color: #191F28;
    margin-bottom: 20px;
}

.planc-info-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.planc-info-item {
    display: flex;
    align-items: center;
    gap: 16px;
}

.planc-info-item .label {
    width: 80px;
    font-size: 14px;
    color: #8B95A1;
}

.planc-info-item .value {
    font-size: 15px;
    color: #191F28;
}

.social-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.social-badge.social-naver {
    background: #E6F7ED;
    color: #03C75A;
}

.social-badge.social-kakao {
    background: #FFF9DB;
    color: #3C1E1E;
}

.planc-mypage-actions {
    text-align: center;
}

/* ==================== 반응형 ==================== */
@media (max-width: 768px) {
    .planc-form-container {
        margin: 24px 16px;
        padding: 32px 24px;
    }

    .planc-form-title {
        font-size: 22px;
        margin-bottom: 24px;
    }

    .planc-input-wrapper input {
        height: 48px;
        font-size: 14px;
    }

    .planc-submit-btn {
        height: 48px;
        font-size: 15px;
    }
}

/* ==================== 회원 전용 콘텐츠 안내 ==================== */
.members-only-notice {
    text-align: center;
    padding: 60px 24px;
    max-width: 400px;
    margin: 0 auto;
}

.members-only-icon {
    margin-bottom: 24px;
    color: #8B95A1;
}

.members-only-icon svg {
    width: 64px;
    height: 64px;
}

.members-only-title {
    font-size: 20px;
    font-weight: 700;
    color: #191F28;
    margin-bottom: 12px;
}

.members-only-desc {
    font-size: 15px;
    color: #4E5968;
    margin-bottom: 32px;
    line-height: 1.5;
}

.members-only-btn {
    display: inline-block;
    background: #3182F6;
    color: #fff;
    padding: 14px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease;
}

.members-only-btn:hover {
    background: #1B64DA;
}

.members-only-register {
    margin-top: 20px;
    font-size: 14px;
    color: #8B95A1;
}

.members-only-register a {
    color: #3182F6;
    text-decoration: none;
    font-weight: 500;
}

.members-only-register a:hover {
    text-decoration: underline;
}