/* account.css - Customer Dashboard Styles */

.account-page {
  padding: 60px 0 100px;
  background-color: #ffffff;
}

.account-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.account-title {
  font-size: 2.5rem;
  font-weight: 500;
  margin-bottom: 40px;
  color: var(--primary);
}

.account-layout {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

/* Sidebar */
.account-sidebar {
  flex: 0 0 280px;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
}

.sidebar-profile {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px;
  border-bottom: 1px solid #e5e7eb;
}

.sidebar-avatar-wrapper {
  position: relative;
}

.sidebar-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  background-color: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1.2rem;
}

.sidebar-greeting {
  display: flex;
  flex-direction: column;
}

.greeting-text {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.greeting-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
  background: transparent;
  cursor: pointer;
  border: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
}

.sidebar-link:hover {
  background-color: #f9fafb;
}

.sidebar-link.active {
  background-color: var(--primary);
  color: white;
  border-left-color: var(--primary);
}

.sidebar-link.active i {
  color: white;
}

/* Main Content Area */
.account-content {
  flex: 1;
}

.account-section {
  display: none;
  animation: fadeIn 0.4s ease;
}

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

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

/* Section 1: Personal Information */
.personal-info-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 32px;
}

.profile-image-container {
  position: relative;
  width: 80px;
  height: 80px;
}

.profile-image-large {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background-color: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 600;
}

.edit-image-btn {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.edit-image-btn:hover {
  transform: scale(1.1);
}

.btn-dark {
  background-color: var(--primary);
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-dark:hover {
  background-color: #2c2933;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.btn-dark:active {
  transform: translateY(0);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.form-grid.single-col {
  grid-template-columns: 1fr;
  margin-top: 24px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.form-group input, .form-group select {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--primary);
  transition: all 0.2s ease;
}

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

/* Section 2: Orders */
.order-card {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 16px;
  transition: box-shadow 0.2s ease;
}

.order-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f3f4f6;
}

.order-id {
  font-weight: 600;
  color: var(--primary);
}

.order-date {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.order-status {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  background-color: #ecfdf5;
  color: var(--success);
}

.order-body {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.order-item-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.order-item-img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
}

.order-item-title {
  font-weight: 500;
  color: var(--primary);
}

.order-item-price {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.order-actions {
  display: flex;
  gap: 12px;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  padding: 10px 20px;
  border-radius: 6px;
  color: var(--primary);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-outline:hover {
  border-color: var(--primary);
  background-color: #f9fafb;
}

/* Section 4: Addresses */
.address-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.address-card {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 24px;
  position: relative;
}

.address-name {
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.address-badge {
  font-size: 0.7rem;
  background-color: var(--primary);
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 500;
}

.address-details {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 16px;
}

.address-actions {
  display: flex;
  gap: 16px;
}

.address-action-btn {
  background: transparent;
  border: none;
  color: var(--primary);
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.address-action-btn.delete {
  color: var(--error);
}

.add-new-card-btn {
  border: 1px dashed var(--border-color);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  cursor: pointer;
  background: transparent;
  color: var(--primary);
  font-weight: 500;
  transition: all 0.2s ease;
  min-height: 200px;
}

.add-new-card-btn i {
  margin-bottom: 12px;
  color: var(--text-muted);
}

.add-new-card-btn:hover {
  border-color: var(--primary);
  background-color: #f9fafb;
}

/* Modals */
.dashboard-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.dashboard-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content-lg {
  background-color: var(--bg-color);
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
  width: 100%;
  max-width: 600px;
  transform: translateY(20px) scale(0.95);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.2), opacity 0.3s ease;
}

.dashboard-modal.active .modal-content-lg {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.modal-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
}

.close-modal {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  margin-top: 32px;
}

/* Section 5: Saved Cards */
.payment-cards-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.payment-card-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

.card-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.card-brand {
  width: 48px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f3f4f6;
  border-radius: 4px;
}

.card-brand svg {
  max-width: 32px;
  max-height: 20px;
}

.card-details h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.card-details p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Section 6: Notifications */
.timeline {
  position: relative;
  padding-left: 24px;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 31px; /* 24px padding + 7px to center in 14px icon area */
  width: 2px;
  background-color: #f3f4f6;
}

.timeline-item {
  position: relative;
  padding-bottom: 32px;
  display: flex;
  align-items: flex-start;
  gap: 24px;
}

.timeline-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #f9fafb;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  color: var(--primary);
  border: 1px solid var(--border-color);
  flex-shrink: 0;
}

.timeline-content {
  flex: 1;
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.timeline-title {
  font-weight: 600;
  font-size: 1rem;
  color: var(--primary);
}

.timeline-time {
  font-size: 0.85rem;
  color: #9ca3af;
}

.timeline-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Section 7: Settings */
.settings-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.setting-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0;
  border-bottom: 1px solid #f3f4f6;
}

.setting-item:last-child {
  border-bottom: none;
}

.setting-info h4 {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 4px;
}

.setting-info p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Switches */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

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

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--success);
}

input:checked + .slider:before {
  transform: translateX(20px);
}

.setting-dropdown {
  padding: 8px 16px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--primary);
  background-color: #f9fafb;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 36px;
  cursor: pointer;
}

.setting-dropdown:focus {
  outline: none;
  border-color: var(--primary);
}

@media (max-width: 991px) {
  .account-layout {
    flex-direction: column;
  }
  
  .account-sidebar {
    width: 100%;
    flex: none;
  }
  
  .address-grid {
    grid-template-columns: 1fr;
  }
  
  .form-grid {
    grid-template-columns: 1fr;
  }
}
