/* ====================================
   AI Link - 영업대표 회원가입 전용 스타일
   버전: 1.5 (완전한 중앙 정렬)
   작성일: 2025-11-07
   
   컨셉: 전문적이고 신뢰감 있는 톤 💼
   ==================================== */

/* ====================================
   1. 비밀번호 입력 필드
   ==================================== */

.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper input {
    padding-right: 48px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    padding: 8px;
    opacity: 0.6;
    transition: opacity var(--transition-fast);
}

.password-toggle:hover {
    opacity: 1;
}

.password-toggle:focus {
    outline: none;
}

/* ====================================
   2. 구분선
   ==================================== */

.divider {
    height: 1px;
    background: var(--border-color);
    margin: var(--spacing-xl) 0;
}

/* ====================================
   3. 영업 유형 선택 섹션 (폼 내 중앙 정렬)
   ==================================== */

.sales-type-section {
    /* 폼 영역 내에서 중앙 정렬 */
    margin: var(--spacing-xl) auto;
    max-width: 100%;
    padding: 0;
    
    /* 내부 컨텐츠 중앙 정렬 */
    display: flex;
    flex-direction: column;
    align-items: center;
}

.section-title {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
    text-align: center;
    max-width: 900px;
}

.section-description {
    color: #6c757d;
    font-size: 14px;
    text-align: center;
    margin-bottom: var(--spacing-lg);
    max-width: 900px;
}

.role-select-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;  /* 12px → 10px로 줄임 */
    margin-bottom: var(--spacing-lg);
    max-width: 100%;
    width: 100%;
    padding: 12px;  /* 14px → 12px로 줄임 */
    
    /* 하나의 테두리로 묶기 */
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    background: #fafafa;
    box-sizing: border-box;  /* padding 포함 계산 */
}

.role-card {
    position: relative;
    display: block;
    cursor: pointer;
    transition: none !important;
    border: none !important;
    outline: none !important;
    background: none !important;
    box-shadow: none !important;
}

.role-card:hover {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.role-card:focus {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.role-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

/* 카드 컨텐츠 */
.role-card-content {
    position: relative;
    padding: 14px 22px;  /* 14px 18px → 14px 22px (좌우 +4px) */
    border: 2px solid #d0d0d0;  /* 1px → 2px 두껍게 */
    border-radius: 8px;
    background: white;
    transition: all var(--transition-base);
    height: 280px;  /* min-height → height로 강제 고정 */
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

/* 제조사 카드 */
.manufacturer-card:hover .role-card-content {
    border-color: #2196F3;
    box-shadow: 0 4px 16px rgba(33, 150, 243, 0.12);
    transform: translateY(-2px);
}

.manufacturer-card input[type="radio"]:checked ~ .role-card-content {
    border-color: #2196F3;
    background: #f5faff;
    box-shadow: 0 4px 16px rgba(33, 150, 243, 0.15);
}

/* 파트너사 카드 */
.partner-card:hover .role-card-content {
    border-color: #4caf50;
    box-shadow: 0 4px 16px rgba(76, 175, 80, 0.12);
    transform: translateY(-2px);
}

.partner-card input[type="radio"]:checked ~ .role-card-content {
    border-color: #4caf50;
    background: #f5fdf5;
    box-shadow: 0 4px 16px rgba(76, 175, 80, 0.15);
}

/* 추천 뱃지 */
.role-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    background: #f5f5f5;
    color: #666;
}

.role-badge.recommended {
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
    color: white;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* 아이콘 */
.role-icon {
    font-size: 32px;  /* 36px → 32px */
    text-align: center;
    margin: 4px 0;  /* 6px → 4px */
    line-height: 1;
}

/* 제목 - 2줄 허용 */
.role-card-content h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 3px;
    text-align: center;
    white-space: normal;  /* nowrap → normal로 변경 */
    overflow: visible;
    line-height: 1.3;
    min-height: 40px;  /* 최소 높이 지정 */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 부제목 - 2줄 허용 */
.role-subtitle {
    font-size: 10px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-align: center;
    white-space: normal;  /* nowrap → normal로 변경 */
    overflow: visible;
    line-height: 1.4;
    min-height: 28px;  /* 최소 높이 지정 */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 구분선 */
.role-divider {
    height: 1px;
    background: #e0e0e0;
    margin: 8px 0;  /* 10px → 8px */
}

/* 기능 목록 */
.role-features {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center;  /* 세로 중앙 정렬 */
    min-height: 120px;  /* 최소 높이로 균형 맞춤 */
}

.role-features li {
    display: flex;
    align-items: center;
    gap: 5px;  /* 6px → 5px */
    font-size: 11px;  /* 12px → 11px */
    color: var(--text-primary);
    padding: 3px 0;  /* 4px → 3px */
    font-weight: 500;
    white-space: nowrap;
}

.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;  /* 16px → 14px */
    height: 14px;  /* 16px → 14px */
    border-radius: 50%;
    background: #e0e0e0;
    color: #666;
    font-size: 9px;  /* 10px → 9px */
    font-weight: bold;
    flex-shrink: 0;
}

/* 선택 시 체크 아이콘 색상 변경 */
.manufacturer-card input[type="radio"]:checked ~ .role-card-content .feature-icon {
    background: #2196F3;
    color: white;
}

.partner-card input[type="radio"]:checked ~ .role-card-content .feature-icon {
    background: #4caf50;
    color: white;
}

/* 선택 체크마크 */
.role-check {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: white;
    border: 2px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.5);
    transition: all var(--transition-base);
}

.role-card input[type="radio"]:checked ~ .role-card-content .role-check {
    opacity: 1;
    transform: scale(1);
}

.manufacturer-card input[type="radio"]:checked ~ .role-card-content .role-check {
    border-color: #2196F3;
    background: #2196F3;
}

.partner-card input[type="radio"]:checked ~ .role-card-content .role-check {
    border-color: #4caf50;
    background: #4caf50;
}

.check-icon {
    color: white;
    font-size: 16px;
    font-weight: bold;
}

/* 선택 안내 메시지 - 적당한 강조 */
.selection-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: 14px 18px;
    background: #fff4e6;  /* 연한 주황 배경 */
    border-radius: 8px;
    border: 2px solid #ff9800;  /* 주황 테두리 */
    font-size: 14px;
    font-weight: 600;  /* 굵게 */
    color: #e65100;  /* 진한 주황 텍스트 */
    margin-top: var(--spacing-lg);
    max-width: 100%;
    width: 100%;
    box-shadow: 0 2px 6px rgba(255, 152, 0, 0.1);  /* 은은한 그림자 */
}

.note-icon {
    font-size: 20px;
}

/* ====================================
   4. 안내 박스
   ==================================== */

.info-box {
    margin-top: var(--spacing-lg);
    padding: var(--spacing-lg);
    background: #e7f3ff;
    border-radius: var(--border-radius);
    border: 1px solid #2196F3;
}

.info-box h3 {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.info-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-box li {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    padding: var(--spacing-xs) 0;
    padding-left: var(--spacing-md);
    position: relative;
}

.info-box li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #2196F3;
    font-weight: bold;
}

/* ====================================
   5. 경고 문구 박스
   ==================================== */

.warning-box {
    margin-top: var(--spacing-md);
    padding: var(--spacing-md);
    background: #fff3cd;
    border-radius: var(--border-radius);
    border: 1px solid #ffc107;
}

.warning-box p {
    font-size: var(--font-size-xs);
    color: #856404;
    margin: var(--spacing-xs) 0;
    line-height: 1.5;
}

/* ====================================
   6. 링크 텍스트
   ==================================== */

.link-text {
    color: var(--primary-color);
    text-decoration: none;
    font-size: var(--font-size-xs);
    transition: color var(--transition-fast);
}

.link-text:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* ====================================
   7. 체크박스 그룹
   ==================================== */

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    margin: var(--spacing-lg) 0;
}

.checkbox-item {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
}

.checkbox-item input[type="checkbox"] {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
    flex-shrink: 0;
}

.checkbox-item label {
    font-size: var(--font-size-sm);
    color: var(--text-primary);
    cursor: pointer;
    user-select: none;
    line-height: 1.6;
}

/* ====================================
   8. 반응형 디자인
   ==================================== */

@media (max-width: 768px) {
    .role-select-group {
        grid-template-columns: 1fr;  /* 세로 1줄 */
        gap: 16px;
        padding: 16px;
    }
    
    .role-card-content {
        height: auto !important;  /* 고정 높이 해제 */
        min-height: 200px;
        padding: 16px 20px;
    }
    
    .section-title {
        font-size: var(--font-size-lg);
    }
    
    .role-card-content h3 {
        font-size: 16px;  /* 18px → 16px */
        min-height: 38px;
    }
    
    .role-icon {
        font-size: 36px;
    }
    
    .role-features {
        min-height: auto;  /* 모바일에서 최소 높이 해제 */
    }
    
    .info-box h3 {
        font-size: var(--font-size-sm);
    }
    
    .info-box li {
        font-size: 12px;
    }
    
    .warning-box p {
        font-size: 11px;
    }
    
    .selection-note {
        font-size: 12px;
    }
}

@media (max-width: 576px) {
    .role-select-group {
        gap: 12px;
        padding: 12px;  /* 0 10px → 12px로 개선 */
    }
    
    .role-card-content {
        padding: 14px 16px;  /* var(--spacing-lg) 제거 */
    }
    
    .role-icon {
        font-size: 32px;
        margin: var(--spacing-sm) 0;
    }
    
    .role-card-content h3 {
        font-size: 15px;
        min-height: 36px;
    }
    
    .role-subtitle {
        font-size: 11px;
        min-height: 24px;
    }
    
    .role-features li {
        font-size: 12px;
    }
    
    .role-badge {
        font-size: 10px;
        padding: 3px 8px;
    }
    
    /* 모바일용 이메일 입력 그룹 */
    .email-input-group {
        flex-direction: column !important;  /* 세로 배치 */
        gap: 12px !important;
    }
    
    .email-input-group input {
        padding: 14px 16px !important;  /* 버튼과 동일한 padding */
        font-size: 15px !important;
        height: auto !important;
        min-height: 48px !important;  /* 최소 높이 지정 */
    }
    
    .email-input-group .btn {
        width: 100% !important;  /* 버튼 전체 너비 */
        min-width: auto !important;
        padding: 14px 16px !important;  /* 12px → 14px 더 크게 */
        font-size: 15px !important;
        height: auto !important;
        min-height: 48px !important;  /* 입력 필드와 동일 */
    }
}

/* ====================================
   9. 애니메이션 효과
   ==================================== */

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sales-type-section {
    animation: slideIn 0.4s ease;
}

/* ====================================
   10. 버튼 스타일 강화
   ==================================== */

.btn-primary {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    border: none;
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #1a3461 0%, #234780 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 60, 114, 0.3);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

/* ====================================
   11. 포커스 상태
   ==================================== */

.form-group input:focus,
.form-group select:focus {
    border-color: #2196F3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

/* ====================================
   12. 로딩 상태
   ==================================== */

.btn[data-loading="true"] {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.btn[data-loading="true"]::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* ====================================
   이메일 인증 버튼 강조 스타일
   ==================================== */

/* 필수 강조 클래스 */
.highlight-required {
    position: relative;
    animation: pulse-border 2s ease-in-out infinite;
    border: 2px solid #ff6b6b !important;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.2) !important;
}

@keyframes pulse-border {
    0%, 100% {
        box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.2);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(255, 107, 107, 0.3);
    }
}

/* 버튼 흔들림 애니메이션 */
.shake-animation {
    animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

/* ====================================
   토스트 메시지 시스템
   ==================================== */

.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    min-width: 300px;
    max-width: 500px;
    padding: 16px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    z-index: 10000;
    font-family: 'Noto Sans KR', sans-serif;
}

.toast.show {
    transform: translateX(0);
}

.toast-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 14px;
    font-weight: bold;
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
    font-size: 14px;
    color: #333;
    line-height: 1.5;
}

/* Success Toast */
.toast-success {
    border-left: 4px solid #10b981;
}

.toast-success .toast-icon {
    background: #d1fae5;
    color: #10b981;
}

/* Error Toast */
.toast-error {
    border-left: 4px solid #ef4444;
}

.toast-error .toast-icon {
    background: #fee2e2;
    color: #ef4444;
}

/* Warning Toast */
.toast-warning {
    border-left: 4px solid #f59e0b;
}

.toast-warning .toast-icon {
    background: #fef3c7;
    color: #f59e0b;
}

/* Info Toast */
.toast-info {
    border-left: 4px solid #3b82f6;
}

.toast-info .toast-icon {
    background: #dbeafe;
    color: #3b82f6;
}

/* 모바일 반응형 */
@media (max-width: 576px) {
    .toast {
        top: 10px;
        right: 10px;
        left: 10px;
        min-width: auto;
        max-width: none;
        transform: translateY(-100px);
    }
    
    .toast.show {
        transform: translateY(0);
    }
}