/* Account Page Styles */

.account-page {
  padding: 48px 0;
  min-height: 600px;
  background: var(--bg-cream);
}

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

.page-header h1 {
  font-size: 38px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

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

/* Modern Pill Tabs */
.tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-white);
  border-radius: 16px;
  padding: 6px;
  margin-bottom: 32px;
  overflow-x: auto;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border-color);
}

.tab {
  padding: 14px 24px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  border: none;
  background: transparent;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 12px;
}

.tab-icon {
  font-size: 18px;
  line-height: 1;
  transition: transform 0.2s ease;
}

.tab-label {
  font-weight: 500;
}

.tab:hover {
  color: var(--text-primary);
  background: var(--bg-light);
}

.tab:hover .tab-icon {
  transform: scale(1.1);
}

.tab.active {
  color: var(--bg-white);
  background: var(--primary-color);
  box-shadow: 0 4px 12px rgba(20, 17, 15, 0.15);
}

.tab.active .tab-icon {
  transform: scale(1.05);
}

.tab .badge {
  background: var(--accent-color);
  animation: pulse 2s ease-in-out infinite;
}

.tab-content {
  min-height: 400px;
}

/* Listings Tab */
.tab-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.tab-header h2 {
  font-size: 24px;
  font-weight: 700;
}

.my-listings-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.my-listing-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: fadeInUp 0.3s ease-out;
}

.my-listing-card .listing-image-wrapper {
  padding-bottom: 0;
  height: 360px;
  position: relative;
  overflow: hidden;
}

.my-listing-card .listing-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.my-listing-card .listing-content {
  padding: 10px;
}

.my-listing-card .listing-title {
  font-size: 14px;
}

.my-listing-card .listing-brand {
  font-size: 12px;
}

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

.listing-stats {
  display: flex;
  justify-content: space-around;
  padding: 14px 16px;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  box-shadow: var(--shadow-soft);
}

.listing-stats span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.listing-actions {
  display: flex;
  gap: 10px;
}

/* Favorites Tab */
.favorites-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

/* Messages Tab */
.messages-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
}

.message-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  transition: background 0.2s;
  position: relative;
  cursor: pointer;
}

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

.message-item:hover {
  background: var(--bg-light);
}

.message-item.unread {
  background: #f0f7ff;
}

.message-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 600;
  color: white;
}

.message-content {
  flex: 1;
  min-width: 0;
}

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

.message-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.message-time {
  font-size: 13px;
  color: var(--text-secondary);
}

.message-text {
  font-size: 14px;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.unread-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-color);
  flex-shrink: 0;
}

/* Saved Searches Tab */
.searches-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.search-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  gap: 24px;
}

.search-info {
  flex: 1;
}

.search-info h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.search-criteria {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.search-results {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-color);
}

.search-actions {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

/* Responsive */
@media (max-width: 1024px) {
  .my-listings-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }

  .favorites-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .account-page {
    padding: 24px 0;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
  }

  .page-header h1 {
    font-size: 28px;
  }

  .header-actions {
    width: 100%;
    flex-direction: column;
  }

  .header-actions .btn {
    width: 100%;
  }

  .tabs {
    margin-bottom: 24px;
    gap: 2px;
    padding: 4px;
  }

  .tab {
    padding: 12px 16px;
    font-size: 13px;
    gap: 8px;
  }

  .tab-icon {
    font-size: 16px;
  }

  .tab-label {
    display: none;
  }

  .tab-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
  }

  .tab-header h2 {
    font-size: 20px;
  }

  .my-listings-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .favorites-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .message-item {
    padding: 16px;
    gap: 12px;
  }

  .message-avatar {
    width: 48px;
    height: 48px;
    font-size: 20px;
  }

  .search-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
  }

  .search-actions {
    width: 100%;
    flex-direction: column;
  }

  .search-actions button,
  .search-actions a {
    width: 100%;
  }
}
