/* ========================================
   FLVR FOOD - Account Page Styles
   User account management and tabs
   ======================================== */

/* ========================================
   Account Section Layout
   ======================================== */
.account-section {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--space-8);
  max-width: var(--max-width);
  margin: 0 auto;
  padding: calc(var(--nav-height) + var(--space-8)) var(--content-padding) var(--space-16);
}

/* ========================================
   Account Sidebar
   ======================================== */
.account-sidebar {
  position: sticky;
  top: calc(var(--nav-height) + var(--space-4));
  height: fit-content;
  padding: var(--space-6);
}

.account-profile {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding-bottom: var(--space-6);
  margin-bottom: var(--space-6);
  border-bottom: 1px solid var(--glass-border);
}

.profile-avatar {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--flvr-accent-glow);
  border-radius: var(--radius-full);
  color: var(--flvr-accent);
}

.profile-avatar svg {
  width: 32px;
  height: 32px;
}

.profile-info h3 {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-1);
}

.profile-info p {
  font-size: var(--font-size-sm);
  color: var(--flvr-text-tertiary);
}

.account-nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.account-nav-link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--flvr-text-secondary);
  transition: all var(--transition-fast);
}

.account-nav-link:hover {
  background: var(--glass-bg);
  color: var(--flvr-text-primary);
}

.account-nav-link.active {
  background: var(--flvr-accent);
  color: white;
}

.account-nav-link svg {
  width: 18px;
  height: 18px;
}

/* ========================================
   Account Content
   ======================================== */
.account-content {
  min-height: 600px;
}

.account-tab {
  display: none;
  animation: fadeIn 0.3s ease;
}

.account-tab.active {
  display: block;
}

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

.tab-header {
  margin-bottom: var(--space-6);
}

.tab-header h2 {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-2);
}

.tab-header p {
  color: var(--flvr-text-secondary);
}

/* ========================================
   Orders
   ======================================== */
.orders-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.empty-orders {
  text-align: center;
  padding: var(--space-16) var(--space-8);
}

.empty-icon {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-6);
  background: var(--glass-bg);
  border-radius: var(--radius-2xl);
  color: var(--flvr-text-muted);
}

.empty-icon svg {
  width: 40px;
  height: 40px;
}

.empty-orders h3 {
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-3);
}

.empty-orders p {
  color: var(--flvr-text-tertiary);
  margin-bottom: var(--space-6);
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

/* ========================================
   Wishlist Grid in Account
   ======================================== */
.wishlist-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.empty-wishlist {
  text-align: center;
}

.empty-wishlist .empty-state-icon {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-6);
  background: var(--glass-bg);
  border-radius: var(--radius-2xl);
  color: var(--flvr-text-muted);
}

.empty-wishlist .empty-state-icon svg {
  width: 40px;
  height: 40px;
}

.empty-wishlist h3 {
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-3);
}

.empty-wishlist p {
  color: var(--flvr-text-tertiary);
  margin-bottom: var(--space-6);
}

/* ========================================
   Addresses
   ======================================== */
.addresses-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.add-address-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-8);
  border: 2px dashed var(--glass-border);
  background: transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.add-address-btn:hover {
  border-color: var(--flvr-accent);
  background: var(--flvr-accent-glow);
  color: var(--flvr-accent);
}

.add-address-btn svg {
  width: 32px;
  height: 32px;
}

.add-address-btn span {
  font-weight: var(--font-weight-medium);
}

/* ========================================
   Settings
   ======================================== */
.settings-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.setting-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) var(--space-6);
}

.setting-info h4 {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-1);
}

.setting-info p {
  font-size: var(--font-size-sm);
  color: var(--flvr-text-tertiary);
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}

.toggle-slider::before {
  position: absolute;
  content: '';
  height: 20px;
  width: 20px;
  left: 2px;
  bottom: 2px;
  background: white;
  border-radius: 50%;
  transition: transform var(--transition-fast);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--flvr-accent);
  border-color: var(--flvr-accent);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(22px);
}

/* ========================================
   Responsive Styles
   ======================================== */
@media (max-width: 1024px) {
  .account-section {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
  
  .account-sidebar {
    position: static;
    padding: var(--space-4);
  }
  
  .account-profile {
    padding-bottom: var(--space-4);
    margin-bottom: var(--space-4);
  }
  
  .account-nav {
    flex-direction: row;
    flex-wrap: wrap;
  }
  
  .account-nav-link {
    flex: 1;
    min-width: 120px;
    justify-content: center;
  }
  
  .wishlist-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .account-section {
    padding: calc(var(--nav-height) + var(--space-4)) var(--content-padding) var(--space-10);
  }
  
  .account-sidebar {
    padding: var(--space-4);
  }
  
  .profile-avatar {
    width: 48px;
    height: 48px;
  }
  
  .profile-avatar svg {
    width: 24px;
    height: 24px;
  }
  
  .account-nav-link {
    padding: var(--space-3);
    font-size: var(--font-size-xs);
  }
  
  .account-nav-link svg {
    width: 16px;
    height: 16px;
  }
  
  .tab-header h2 {
    font-size: var(--font-size-xl);
  }
  
  .setting-item {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-4);
  }
  
  .wishlist-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
  }
}

@media (max-width: 480px) {
  .account-nav {
    gap: var(--space-2);
  }
  
  .account-nav-link {
    min-width: calc(50% - var(--space-1));
  }
  
  .wishlist-grid {
    grid-template-columns: 1fr;
  }
}
