/* ============================================================
   4. PROFILE SETTINGS
   ============================================================ */

/* ========== 프로필 이미지 외부 컨테이너 (통합 그룹) ========== */
.profile-image-container {
    padding: 16px;
    border: 1px solid var(--color-border-medium, #e5e5e5);
    border-radius: var(--radius-lg, 10px);
    /* 🔥 v3.7: 배경색 제거 */
}

/* ========== 라디오 버튼 (50:50 그리드) ========== */
.profile-style-radio {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 50:50 비율 */
    gap: 16px;
    margin-bottom: 5px;
}

.radio-option {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* 왼쪽 정렬 */
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--color-text-primary, #1a1a1a);
}

.radio-option input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color, #ff2e7a);
}

.radio-option span {
    font-weight: 500;
}

/* ========== 2개의 이미지 업로드 박스 ========== */
.profile-image-uploads {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.image-upload-box {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px;
    /* 🔥 v3.7: 개별 border와 background 제거 */
}

.image-upload-box.pro-only {
    opacity: 0.6;
}

.upload-preview {
    width: 120px;
    height: 120px;
    margin-bottom: 12px;
    overflow: hidden;
    border-radius: 8px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.upload-preview .thumbnail-img {
    border-radius: 50%;
}

.background-img-placeholder {
    width: 100%;
    height: 100%;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    color: #333;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.upload-btn:hover:not(.pro-only) {
    background: #f0f0f0;
    border-color: #999;
}

.upload-btn.pro-only {
    opacity: 0.5;
    cursor: not-allowed;
}

.delete-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    color: #e74c3c;
    cursor: pointer;
    transition: all 0.2s ease;
}

.delete-btn:hover {
    background: #fee;
    border-color: #e74c3c;
}

.upload-hint {
    margin-top: 8px;
    font-size: 12px;
    color: #666;
    text-align: center;
}

.pro-badge {
    display: inline-block;
    padding: 2px 6px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    margin-left: 4px;
}

/* ========== 프로필 이미지 스타일 선택 ========== */
.profile-style-picker {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 12px;
}

.style-option {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fafafa;
    outline: none;
}

.style-option:focus-visible {
    outline: 2px solid var(--primary-color, #ff2e7a);
    outline-offset: 2px;
}

.style-option:hover:not(.pro-only) {
    border-color: #999;
    background: #f0f0f0;
    transform: translateY(-2px);
}

.style-option.selected {
    border-color: var(--primary-color, #ff2e7a);
    background: #fff5f8;
    box-shadow: 0 2px 8px rgba(255, 46, 122, 0.15);
}

.style-option.pro-only {
    opacity: 0.6;
    cursor: not-allowed;
}

.style-option.pro-only:hover {
    transform: none;
}

.pro-overlay {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 1;
}

.pro-badge-large {
    display: inline-block;
    padding: 4px 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
}

.style-preview {
    margin-bottom: 12px;
}

.style-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    background: #fff;
    border: 2px solid #ddd;
}

.style-icon.classic-circle {
    border-radius: 50%;
}

.style-icon.background-rect {
    border-radius: 8px;
}

.style-info {
    text-align: center;
}

.style-name {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.style-desc {
    font-size: 12px;
    color: #666;
}

/* ========== 프로필 이미지 스타일 - Classic vs Background ========== */
.preview-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px 30px;
    position: relative;
}

/* 🔥 v3.6: 이전 스타일 제거됨 - 하단의 새로운 스타일 사용 (Line 1770~) */

/* ========== 폰트 선택 ========== */
.font-picker {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
}

.font-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fafafa;
}

.font-option:hover:not(.pro-only) {
    border-color: #999;
    background: #f0f0f0;
}

.font-option.pro-only {
    opacity: 0.6;
    cursor: not-allowed;
}

.font-option input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
}

.font-option input[type="radio"]:checked + .font-preview {
    color: var(--primary-color, #ff2e7a);
    font-weight: 600;
}

.font-option:has(input[type="radio"]:checked) {
    border-color: var(--primary-color, #ff2e7a);
    background: #fff5f8;
    box-shadow: 0 2px 8px rgba(255, 46, 122, 0.15);
}

.font-preview {
    font-size: 15px;
    color: #333;
    transition: all 0.2s ease;
}

.font-name-en {
    font-size: 15px;
    color: #333;
    font-weight: inherit;
    margin-left: 0;
}

/* 🔥 v3.6: 실제 폰트 적용 ("반갑습니다" 프리뷰) */
.font-suit {
    font-family: 'SUIT', -apple-system, BlinkMacSystemFont, sans-serif;
}

.font-pretendard {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
}

.font-noto-sans {
    font-family: 'Noto Sans KR', sans-serif;
}

.font-maruburi {
    font-family: 'MaruBuri', serif;
}

.font-gmarket-sans {
    font-family: 'Gmarket Sans', sans-serif;
}

/* ========== 타이틀 사이즈 선택 ========== */
.title-size-picker {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 12px;
}

.size-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fafafa;
    min-height: 80px;
}

.size-option:hover:not(.pro-only) {
    border-color: #999;
    background: #f0f0f0;
}

.size-option.pro-only {
    opacity: 0.6;
    cursor: not-allowed;
}

.size-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.size-option:has(input[type="radio"]:checked):not(.pro-only) {
    border-color: var(--primary-color, #ff2e7a);
    background: #fff5f8;
    box-shadow: 0 2px 8px rgba(255, 46, 122, 0.15);
}

.size-preview {
    font-weight: 600;
    color: #333;
    transition: all 0.2s ease;
}

.size-preview.small-text {
    font-size: 14px;
}

.size-preview.large-text {
    font-size: 20px;
}

.size-option:has(input[type="radio"]:checked):not(.pro-only) .size-preview {
    color: var(--primary-color, #ff2e7a);
}

/* ========== 저장 버튼 상태 ========== */
.btn.saving {
    opacity: 0.7;
    pointer-events: none;
}

/* ========== 모바일 반응형 ========== */
@media (max-width: 600px) {
    .profile-image-uploads {
        grid-template-columns: 1fr 1fr; /* ✅ 가로 고정 유지 */
        gap: 12px; /* 간격만 줄임 */
    }

    .profile-style-picker {
        grid-template-columns: 1fr;
    }

    .title-size-picker {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .size-option {
        padding: 16px 12px;
        min-height: 70px;
    }

    .upload-preview {
        width: 100px;
        height: 100px;
    }

    .style-icon {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
}

