/**
 * Dealy - 프로필 편집 스타일
 */

/* ========== 모달 오버레이 ========== */
.profile-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex !important;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
  opacity: 1 !important;
  pointer-events: auto !important;
  animation: fadeIn 0.2s;
}

.profile-modal-container {
  background: white;
  border-radius: var(--radius-lg);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ========== 모달 헤더 ========== */
.modal-header {
  padding: 24px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-close {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--gray-100);
  color: var(--text-secondary);
  border-radius: 50%;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background: var(--gray-200);
  color: var(--text-primary);
}

/* ========== 모달 바디 ========== */
.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

/* ========== 폼 섹션 ========== */
.form-section {
  margin-bottom: 32px;
}

.form-section:last-of-type {
  margin-bottom: 0;
}

.section-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary);
}

/* ========== 폼 그룹 ========== */
.form-group {
  margin-bottom: 20px;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.form-group .required {
  color: var(--danger);
}

.form-group input {
  width: 100%;
  padding: 12px 16px;
  font-size: 15px;
  border: 2px solid var(--gray-300);
  border-radius: var(--radius-md);
  transition: border-color 0.2s;
  background: var(--bg-primary);
  color: var(--text-primary);
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary);
}

.form-group input:disabled {
  background: var(--gray-100);
  color: var(--text-tertiary);
  cursor: not-allowed;
}

.form-help {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-tertiary);
}

/* ========== 모달 푸터 ========== */
.modal-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--gray-200);
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: nowrap;
}

.modal-footer .btn {
  white-space: nowrap;
}

.modal-footer .btn-outline {
  flex-shrink: 0;
}

/* ========== 모바일 최적화 ========== */
@media (max-width: 768px) {
  .profile-modal-overlay {
    padding: 0;
    align-items: flex-end;
  }
  
  .profile-modal-container {
    max-height: 95vh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }
  
  .modal-header {
    padding: 20px;
  }
  
  .modal-body {
    padding: 20px;
  }
  
  .modal-footer {
    padding: 16px 20px;
    flex-direction: column;
    gap: 8px;
  }
  
  .modal-footer .btn {
    width: 100%;
  }
  
  .modal-footer .btn-outline {
    order: -1;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .modal-footer .btn-outline {
    font-size: 14px;
    padding: 10px 16px;
  }
}
