/* ==========================================================================
   COCOACAR MYPAGE - STYLES
   ========================================================================== */

:root {
  --mp-max-width: 600px;
  --mp-bg: #f8fafc;
  --mp-card-bg: #ffffff;
  --mp-text: #0f172a;
  --mp-text-sub: #64748b;
  --mp-text-muted: #94a3b8;
  --mp-border: #e2e8f0;
  --mp-border-light: #f1f5f9;
  --mp-primary: #10b981; /* Cocoacar green accent */
  --mp-primary-dark: #059669;
  --mp-danger: #ef4444;
  --mp-danger-hover: #dc2626;
  --mp-radius-lg: 18px;
  --mp-radius-md: 12px;
  --mp-radius-sm: 8px;
  --mp-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body.mp-body {
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  background-color: var(--mp-bg);
  color: var(--mp-text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

.mp-wrap {
  max-width: var(--mp-max-width);
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--mp-bg);
}

/* Header */
.mp-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--mp-border);
}

.mp-header__inner {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

.mp-header__back {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--mp-text);
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.15s;
}

.mp-header__back:hover {
  background-color: #f1f5f9;
}

.mp-header__title {
  font-size: 17px;
  font-weight: 700;
  color: var(--mp-text);
  letter-spacing: -0.01em;
}

.mp-header__home {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: #059669;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 20px;
  background-color: #ecfdf5;
  transition: opacity 0.15s;
}

.mp-header__home:hover {
  opacity: 0.85;
}

/* Main Content */
.mp-main {
  flex: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Card Common */
.mp-card {
  background-color: var(--mp-card-bg);
  border-radius: var(--mp-radius-lg);
  border: 1px solid var(--mp-border);
  box-shadow: var(--mp-shadow);
  padding: 20px;
}

/* Profile Card */
.mp-profile-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mp-profile-head {
  display: flex;
  align-items: center;
  gap: 16px;
}

.mp-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.mp-profile-info {
  flex: 1;
  min-width: 0;
}

.mp-profile-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.mp-profile-name {
  font-size: 19px;
  font-weight: 800;
  color: var(--mp-text);
  letter-spacing: -0.02em;
}

.mp-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 12px;
  background-color: #f1f5f9;
  color: #475569;
}

.mp-badge--kakao {
  background-color: #fee500;
  color: #191919;
}

.mp-badge--naver {
  background-color: #03c75a;
  color: #ffffff;
}

.mp-profile-sub {
  font-size: 13px;
  color: var(--mp-text-sub);
  word-break: break-all;
}

.mp-profile-date {
  font-size: 11px;
  color: var(--mp-text-muted);
  margin-top: 2px;
}

.mp-profile-actions {
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid var(--mp-border-light);
  padding-top: 14px;
}

/* Buttons */
.mp-btn {
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: var(--mp-radius-md);
  transition: all 0.15s;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mp-btn--sm {
  font-size: 12px;
  padding: 6px 12px;
  border-radius: var(--mp-radius-sm);
}

.mp-btn--outline {
  background-color: #ffffff;
  border: 1px solid var(--mp-border);
  color: #475569;
}

.mp-btn--outline:hover {
  background-color: #f8fafc;
  border-color: #cbd5e1;
}

.mp-btn--primary {
  background-color: var(--mp-primary);
  color: #ffffff;
}

.mp-btn--primary:hover {
  background-color: var(--mp-primary-dark);
}

.mp-btn--danger {
  background-color: var(--mp-danger);
  color: #ffffff;
}

.mp-btn--danger:hover {
  background-color: var(--mp-danger-hover);
}

/* Point Card */
.mp-point-card {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #ffffff;
  border: none;
}

.mp-point-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.mp-point-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #94a3b8;
}

.mp-point-icon {
  font-size: 16px;
}

.mp-point-link {
  font-size: 12px;
  font-weight: 600;
  color: #34d399;
  text-decoration: none;
  transition: opacity 0.15s;
}

.mp-point-link:hover {
  opacity: 0.8;
}

.mp-point-body {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 8px;
}

.mp-point-value {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.mp-point-unit {
  font-size: 18px;
  font-weight: 700;
  color: #34d399;
}

.mp-point-desc {
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.4;
}

/* Section Title */
.mp-section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--mp-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 12px;
}

/* Menu List */
.mp-menu-card {
  padding: 16px 20px;
}

.mp-menu-list {
  list-style: none;
}

.mp-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--mp-border-light);
  cursor: pointer;
  transition: background-color 0.12s;
}

.mp-menu-item:last-child {
  border-bottom: none;
}

.mp-menu-item:hover {
  background-color: #f8fafc;
}

.mp-menu-item__icon {
  font-size: 18px;
  width: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mp-menu-item__txt {
  flex: 1;
  font-size: 15px;
  font-weight: 600;
  color: var(--mp-text);
  letter-spacing: -0.01em;
}

.mp-menu-item__arrow {
  font-size: 16px;
  color: #cbd5e1;
  font-weight: 700;
}

/* Withdraw Section */
.mp-withdraw-section {
  display: flex;
  justify-content: center;
  padding: 24px 0 40px;
}

.mp-withdraw-trigger {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 13px;
  color: #94a3b8;
  text-decoration: underline;
  transition: color 0.15s;
}

.mp-withdraw-trigger:hover {
  color: var(--mp-danger);
}

/* Modal Common */
.mp-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.mp-modal.open {
  display: flex;
}

.mp-modal__overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
}

.mp-modal__content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 460px;
  background-color: #ffffff;
  border-radius: var(--mp-radius-lg);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: 90vh;
  animation: mpModalSlideUp 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes mpModalSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.mp-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--mp-border);
}

.mp-modal__title {
  font-size: 18px;
  font-weight: 800;
  color: var(--mp-text);
}

.mp-modal__close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--mp-text-muted);
  cursor: pointer;
  line-height: 1;
}

.mp-modal__body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.mp-modal__foot {
  display: flex;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid var(--mp-border);
  background-color: #f8fafc;
}

.mp-modal__foot .mp-btn {
  flex: 1;
}

/* Withdraw Warning */
.mp-warn-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: var(--mp-radius-md);
  background-color: #fef2f2;
  border: 1px solid #fee2e2;
  color: #b91c1c;
  font-size: 14px;
  margin-bottom: 14px;
}

.mp-warn-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  background-color: #f8fafc;
  border-radius: var(--mp-radius-md);
  margin-bottom: 16px;
}

.mp-warn-list li {
  font-size: 13px;
  color: #475569;
  line-height: 1.5;
  position: relative;
  padding-left: 14px;
}

.mp-warn-list li::before {
  content: "•";
  position: absolute;
  left: 2px;
  color: #ef4444;
  font-weight: bold;
}

.mp-form-group {
  margin-bottom: 16px;
}

.mp-form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
}

.mp-select {
  width: 100%;
  height: 44px;
  border-radius: var(--mp-radius-md);
  border: 1px solid var(--mp-border);
  padding: 0 12px;
  font-size: 14px;
  background-color: #ffffff;
  color: var(--mp-text);
  outline: none;
  font-family: inherit;
}

.mp-select:focus {
  border-color: #10b981;
}

.mp-agree-box {
  padding: 12px;
  background-color: #fff1f2;
  border: 1px solid #ffe4e6;
  border-radius: var(--mp-radius-md);
}

.mp-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #9f1239;
  cursor: pointer;
  line-height: 1.4;
}

.mp-checkbox-label input {
  margin-top: 2px;
  accent-color: #ef4444;
  width: 16px;
  height: 16px;
}

/* Social Login Buttons in Modal */
.mp-social-login-btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mp-social-btn {
  width: 100%;
  height: 48px;
  border: none;
  border-radius: var(--mp-radius-md);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  transition: opacity 0.15s;
}

.mp-social-btn:hover {
  opacity: 0.9;
}

.mp-social-btn--kakao {
  background-color: #fee500;
  color: #191919;
}

.mp-social-btn--naver {
  background-color: #03c75a;
  color: #ffffff;
}

.mp-social-btn--google {
  background-color: #ffffff;
  color: #374151;
  border: 1px solid #d1d5db;
}

/* Toast */
.mp-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background-color: rgba(15, 23, 42, 0.92);
  color: #ffffff;
  padding: 12px 22px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 600;
  z-index: 10000;
  pointer-events: none;
  opacity: 0;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  max-width: 90%;
  text-align: center;
}

.mp-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
