/* Profile Page Styles */

/* ==========================================================================
   USER PROFILE
   ========================================================================== */
.ep-profile-shell {
  padding: 0 20px;
  max-width: 1600px;
  width: 80%;
  margin: 0 auto;
}

.ep-profile-head {
  margin-bottom: 24px;
}

.ep-profile-head h1 {
  font-size: 2rem;
  color: var(--ep-text-primary, #1a1a1a);
  font-weight: 600;
  margin: 0 0 8px 0;
}

.ep-profile-sub {
  color: #666;
  font-size: 1rem;
  margin: 0;
}

.ep-profile-grid {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 24px;
}

.ep-profile-card {
  background: #fff;
  border: 1px solid var(--ep-border);
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.ep-profile-card h3 {
  margin: 0 0 16px;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--ep-text-primary, #1a1a1a);
  padding: 20px 24px;
  border-bottom: 1px solid #e5e5e5;
}

.ep-profile-card p {
  margin: 0 0 12px;
  color: var(--ep-text-soft);
  font-size: .9rem;
}

.ep-profile-card strong {
  color: var(--ep-text);
  font-weight: 600;
}

.ep-profile-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.ep-profile-actions .ep-btn {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: .85rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: .2s ease;
  border: none;
}

.ep-profile-actions .ep-btn-primary {
  background: var(--ep-gradient-primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(var(--ep-primary-rgb), .22);
}

.ep-profile-actions .ep-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(var(--ep-primary-rgb), .28);
}

.ep-profile-actions .ep-btn-secondary {
  background: transparent;
  color: var(--ep-primary);
  border: 1px solid rgba(var(--ep-primary-rgb), .12);
}

.ep-profile-actions .ep-btn-secondary:hover {
  background: rgba(var(--ep-primary-rgb), .06);
}

@media (max-width: 1024px) {
  .ep-profile-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .ep-order-details__meta {
    flex-basis: 320px;
  }
}

@media (max-width: 768px) {
  .ep-profile-shell {
    padding: 0 16px;
  }
  
  .ep-profile-actions {
    flex-direction: column;
  }
  
  .ep-profile-actions .ep-btn {
    width: 100%;
    text-align: center;
  }
}


/* Profile Hero Card */
.ep-profile-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  margin-bottom: 24px;
  gap: 20px;
}

.ep-profile-hero__left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.ep-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ep-primary, #0a84ff) 0%, #e66000 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  flex-shrink: 0;
}

.ep-profile-name {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--ep-text-primary, #1a1a1a);
  margin: 0 0 4px 0;
}

.ep-profile-hero__meta {
  color: #666;
  font-size: 0.9rem;
}

.ep-profile-hero__right {
  display: flex;
  gap: 32px;
}

.ep-hero-stat {
  text-align: center;
}

.ep-hero-stat__value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--ep-primary, #0a84ff);
  margin-bottom: 4px;
}

.ep-hero-stat__label {
  color: #666;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}


.ep-profile-body {
  padding: 24px;
}

/* Form Styles */
.ep-form-group {
  margin-bottom: 15px;
}

.ep-form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
  color: var(--ep-text, #1a1a1a);
  font-size: 0.9rem;
}

.ep-form-group input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.ep-form-group input:focus {
  outline: none;
  border-color: var(--ep-primary, #0a84ff);
}

.ep-form-errors {
  color: #dc3545;
  font-size: 12px;
  margin-top: 5px;
}

/* Orders List */
.ep-orders-card {
  grid-column: span 1;
}

.ep-orders-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ep-order {
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  padding: 16px;
  transition: box-shadow 0.2s ease;
}

.ep-order:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.ep-order-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.ep-order-head__left {
  min-width: 0;
}

.ep-order-head__right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  flex-shrink: 0;
}

.ep-order-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ep-order-toggle-btn {
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid rgba(var(--ep-primary-rgb), 0.18);
  background: rgba(var(--ep-primary-rgb), 0.06);
  color: var(--ep-primary);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.ep-order-toggle-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(var(--ep-primary-rgb), 0.12);
  background: rgba(var(--ep-primary-rgb), 0.1);
}

.ep-order-toggle-btn.is-active {
  background: var(--ep-gradient-primary);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 10px 26px rgba(var(--ep-primary-rgb), 0.18);
}

.ep-order-toggle-btn.is-sm {
  padding: 6px 10px;
  font-size: 0.7rem;
}

.ep-order-toggle-btn.is-lg {
  padding: 10px 14px;
  font-size: 0.8rem;
}

.ep-order-head strong {
  font-size: 1rem;
  color: var(--ep-text-primary, #1a1a1a);
}

.ep-order-meta {
  font-size: 0.85rem;
  color: #666;
  margin-top: 4px;
}

.ep-order-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.ep-order-badge--new {
  background: #e3f2fd;
  color: #1976d2;
}

.ep-order-badge--processing {
  background: #fff3e0;
  color: #f57c00;
}

.ep-order-badge--confirmed {
  background: #f3e5f5;
  color: #7b1fa2;
}

.ep-order-badge--in_progress {
  background: #e0f2f1;
  color: #00796b;
}

.ep-order-badge--completed {
  background: #e8f5e9;
  color: #388e3c;
}

.ep-order-badge--canceled {
  background: #ffebee;
  color: #d32f2f;
}

.ep-order-total-small {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ep-primary, #0a84ff);
}

.ep-order-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ep-order-items-wrap {
  position: relative;
}

.ep-order-items--scroll {
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

.ep-order-items-wrap::before,
.ep-order-items-wrap::after {
  display: none;
}

.ep-order-items-wrap::before {
  top: 0;
}

.ep-order-items-wrap::after {
  bottom: 0;
}

.ep-order-items-wrap[data-ep-scroll-top='1']::before {
  opacity: 1;
}

.ep-order-items-wrap[data-ep-scroll-bottom='1']::after {
  opacity: 1;
}

.ep-order-details {
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  padding-top: 14px;
  margin-top: 14px;
  background: linear-gradient(180deg, rgba(var(--ep-primary-rgb), 0.03) 0%, rgba(255, 255, 255, 1) 60%);
  border-radius: 10px;
  max-width: 100%;
  box-sizing: border-box;
  overflow: visible;
}

.ep-order-details__grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 100%;
  box-sizing: border-box;
}

.ep-order-details__meta {
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  background: #fff;
  padding: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  flex: 0 0 auto;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  transition: padding 0.22s ease;
}

.ep-order-details__items {
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  background: #fff;
  padding: 14px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  flex: 0 0 auto;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  transition: padding 0.22s ease;
}

.ep-order-details__title {
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--ep-text-soft);
  margin-bottom: 10px;
}

.ep-order-kv {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 6px 10px;
  padding: 6px 0;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.06);
  min-width: 0;
}

.ep-order-kv:last-child {
  border-bottom: none;
}

.ep-order-k {
  font-size: 0.78rem;
  color: var(--ep-text-soft);
  font-weight: 700;
  white-space: normal;
  flex: 0 0 auto;
}

.ep-order-v {
  font-size: 0.82rem;
  color: var(--ep-text);
  font-weight: 600;
  text-align: left;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.ep-order-details__meta .ep-order-k {
  font-size: 0.7rem;
}

.ep-order-details__meta .ep-order-v {
  font-size: 0.76rem;
  line-height: 1.25;
}

.ep-order-item-small__text {
  min-width: 0;
  max-width: 100%;
}

.ep-empty-state--compact {
  padding: 16px;
  border: 1px dashed var(--ep-border);
  border-radius: 12px;
  background: #fff;
}

.ep-order-item-small {
  display: flex;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 10px;
  background: #fff;
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  max-width: 100%;
  box-sizing: border-box;
}

.ep-order-item-small.is-clickable {
  cursor: pointer;
  padding: 12px 14px;
}

.ep-order-item-small.is-clickable:hover {
  background-color: #f5f5f5;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
  transform: translateY(-1px);
}

.ep-order-item-small.is-clickable:focus {
  outline: none;
}

.ep-order-item-small.is-clickable:focus-visible {
  outline: 2px solid rgba(var(--ep-primary-rgb), 0.55);
  outline-offset: 2px;
}

.ep-order-item-small__left {
  display: flex;
  gap: 12px;
  align-items: center;
  flex: 1;
  min-width: 0;
}

.ep-order-item-small__left img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 4px;
  background: #f9f9f9;
  flex-shrink: 0;
}

/* Brand logo fallback styling for profile */
.ep-profile-media__brand {
  width: 48px;
  height: 48px;
  padding: 6px;
  background: linear-gradient(135deg, #f8fafc 0%, #eef2f7 100%);
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-sizing: border-box;
}

.ep-profile-media__brand img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0.85;
}

.ep-order-item-small__left a {
  color: var(--ep-text-primary, #1a1a1a);
  text-decoration: none;
  font-size: 0.9rem;
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ep-order-item-small.is-clickable .ep-order-item-small__left a {
  font-size: 1rem;
  line-height: 1.35;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.ep-order-item-small__left a:hover {
  color: var(--ep-primary, #0a84ff);
}

.ep-order-item-meta {
  font-size: 0.8rem;
  color: #666;
  margin-top: 2px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ep-order-item-small.is-clickable .ep-order-item-meta {
  font-size: 0.86rem;
  line-height: 1.35;
  overflow: visible;
  text-overflow: clip;
}

.ep-deleted-item {
  color: #999;
  font-style: italic;
}

.ep-empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #999;
  font-size: 1rem;
}

/* Responsive Design */
@media (max-width: 968px) {
  .ep-profile-grid {
    grid-template-columns: 1fr;
  }

  .ep-orders-card {
    grid-column: span 1;
  }
}

@media (max-width: 768px) {
  .ep-profile-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .ep-profile-hero__right {
    width: 100%;
    justify-content: space-around;
  }

  .ep-form-group input {
    width: 100%;
  }

  .ep-order-head {
    gap: 14px;
    flex-direction: column;
    align-items: stretch;
  }

  .ep-order-head__right {
    width: 100%;
    align-items: stretch;
  }

  .ep-order-total-small {
    text-align: left;
  }

  .ep-order-toggle-btn {
    width: 100%;
  }

  .ep-order-v {
    padding-left: 0;
  }
}

@media (max-width: 480px) {
  .ep-profile-shell {
    width: 100%;
    padding: 0 12px;
  }

  .ep-profile-body {
    padding: 18px;
  }

  .ep-order {
    padding: 14px;
  }

  .ep-order-details__meta,
  .ep-order-details__items {
    padding: 12px;
  }

  .ep-order-items--scroll {
    max-height: none;
  }
}

@media (max-width: 320px) {
  .ep-profile-shell {
    padding: 0 10px;
  }

  .ep-profile-card {
    padding: 16px;
  }

  .ep-order-item-small {
    padding: 10px;
  }

  .ep-order-item-small.is-clickable {
    padding: 12px;
  }
}

