/* ==================== PROFILE PAGE STYLES ==================== */
:root {
  --brand-orange: #ff6701;
  --brand-orange-light: #ff8533;
  --brand-orange-dark: #e55c00;
  --verified: #10b981;
  --background: #f8f9fa;
  --surface: #ffffff;
  --text-primary: #1a1a1a;
  --text-secondary: #666666;
  --text-tertiary: #999999;
  --border: #e0e0e0;
  --border-light: #f0f0f0;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-light: 0 2px 8px rgba(0, 0, 0, 0.04);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 50%;
  --spacing-xs: 8px;
  --spacing-sm: 12px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --primary: #FF6701;
  --primary-dark: #E65A00;
  --text-light: #64748b;
  --border-light: #f1f5f9;
}

/* ==================== BASE RESET & TYPOGRAPHY ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  background-color: var(--background);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-bottom: 80px;
  min-height: 100vh;
}

/* ==================== PROFILE CONTAINER ==================== */
.profile-container {
  max-width: 600px;
  margin: 0 auto;
  padding: var(--spacing-sm);
  animation: fadeIn 0.4s ease-out;
}

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

/* ==================== PROFILE HEADER (VIEW MODE) ==================== */
.profile-header {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl) var(--spacing-lg);
  box-shadow: var(--shadow);
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  margin-bottom: var(--spacing-lg);
}

.profile-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand-orange), var(--brand-orange-light));
}

.profile-pic {
  width: 120px;
  height: 120px;
  margin: 0 auto var(--spacing-md);
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--brand-orange-light), var(--brand-orange));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 4px solid var(--surface);
  box-shadow: var(--shadow);
  position: relative;
  transition: var(--transition);
}

.profile-pic i {
  font-size: 3.5rem;
  color: white;
  transition: var(--transition);
}

.profile-pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.profile-pic:hover {
  transform: scale(1.05);
}

.profile-name {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-xs);
  margin-bottom: var(--spacing-xs);
}

#profileNameText {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* ==================== VERIFIED BADGE ==================== */

.verified-icon-modal {
  color: var(--verified);
  font-size: 22px;
  align-items: center;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.profile-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: var(--spacing-lg);
}

/* ==================== PROFILE BUTTONS ==================== */
.profile-buttons {
  display: flex;
  gap: var(--spacing-sm);
  justify-content: center;
  flex-wrap: wrap;
}

.edit-btn, .logout-btn {
  padding: var(--spacing-sm) var(--spacing-lg);
  border-radius: var(--radius-md);
  border: none;
  font-family: var(--font-family);
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 140px;
}

.edit-btn {
  background: var(--brand-orange);
  color: white;
}

.edit-btn:hover {
  background: var(--brand-orange-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(255, 103, 1, 0.2);
}

.logout-btn {
  background: #ef4444;
  color: white;
}

.logout-btn:hover {
  background: #dc2626;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(239, 68, 68, 0.2);
}

/* ==================== USER LISTINGS SECTION ==================== */
.user-listings {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow);
  margin-bottom: var(--spacing-lg);
}

.user-listings h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: var(--spacing-md);
  color: var(--text-primary);
  position: relative;
  padding-bottom: var(--spacing-xs);
}

.user-listings h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--brand-orange);
  border-radius: 2px;
}

.no-listings {
  text-align: center;
  padding: var(--spacing-xl) var(--spacing-md);
  color: var(--text-tertiary);
  font-style: italic;
}

/* ==================== LISTINGS GRID ==================== */
.listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: var(--spacing-md);
  margin-top: var(--spacing-md);
}

.listing-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-light);
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid var(--border-light);
}

.listing-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--brand-orange-light);
}

.listing-image-wrapper {
  position: relative;
  height: 120px;
  overflow: hidden;
}

.listing-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.listing-card:hover .listing-image-wrapper img {
  transform: scale(1.05);
}

.listing-status {
  position: absolute;
  top: var(--spacing-xs);
  right: var(--spacing-xs);
  padding: 2px var(--spacing-sm);
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  backdrop-filter: blur(10px);
}

.status-approved {
  background: rgba(72, 187, 120, 0.9);
  color: white;
}

.status-pending {
  background: rgba(245, 158, 11, 0.9);
  color: white;
}

.listing-info {
  padding: var(--spacing-sm);
}

.listing-info h4 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: var(--spacing-xs);
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.listing-price {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--brand-orange);
  margin-bottom: var(--spacing-sm);
}

.listing-actions {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
  margin-top: var(--spacing-xs);
}

.action-btn {
  flex: 1;
  padding: 4px var(--spacing-xs);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.edit-btn-listing {
  background: rgba(255, 103, 1, 0.1);
  color: var(--brand-orange);
}

.edit-btn-listing:hover {
  background: var(--brand-orange);
  color: white;
}

.delete-btn-listing {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.delete-btn-listing:hover {
  background: #ef4444;
  color: white;
}

.share-btn {
  background: rgba(255, 103, 1, 0.1);
  color: #ff6701;
}

.share-btn:hover {
  background: #ff6701;
  color: white;
}

/* ==================== EDIT PROFILE FORM ==================== */
.profile-edit {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  box-shadow: var(--shadow);
  animation: slideUp 0.3s ease-out;
}

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

.profile-edit h2 {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: var(--spacing-lg);
  color: var(--text-primary);
  position: relative;
}

.profile-edit h2::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--brand-orange);
  border-radius: 2px;
}

#editForm {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

#editForm label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
}

#editForm label::before {
  content: '•';
  color: var(--brand-orange);
  font-size: 1.2rem;
}

#editForm input {
  padding: var(--spacing-sm) var(--spacing-md);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  font-family: var(--font-family);
  font-size: 0.95rem;
  color: var(--text-primary);
  transition: var(--transition);
  background: var(--background);
}

#editForm input:focus {
  outline: none;
  border-color: var(--brand-orange);
  box-shadow: 0 0 0 3px rgba(255, 103, 1, 0.1);
  background: var(--surface);
}

#editForm input::placeholder {
  color: var(--text-tertiary);
}

.file-input-wrapper {
  position: relative;
}

#editPic {
  width: 100%;
  padding: var(--spacing-sm);
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  background: var(--background);
  cursor: pointer;
  transition: var(--transition);
}

#editPic:hover {
  border-color: var(--brand-orange);
  background: rgba(255, 103, 1, 0.05);
}

#editPic::-webkit-file-upload-button {
  visibility: hidden;
}

.file-input-wrapper::after {
  content: 'Choose file';
  position: absolute;
  right: var(--spacing-sm);
  top: 50%;
  transform: translateY(-50%);
  background: var(--brand-orange);
  color: white;
  padding: 4px var(--spacing-sm);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  pointer-events: none;
}

.edit-buttons {
  display: flex;
  gap: var(--spacing-md);
  margin-top: var(--spacing-lg);
}

.save-btn, .cancel-btn {
  flex: 1;
  padding: var(--spacing-md);
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-family);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.save-btn {
  background: var(--brand-orange);
  color: white;
}

.save-btn:hover:not(:disabled) {
  background: var(--brand-orange-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(255, 103, 1, 0.2);
}

.cancel-btn {
  background: var(--background);
  color: var(--text-secondary);
  border: 2px solid var(--border);
}

.cancel-btn:hover {
  background: var(--border);
  color: var(--text-primary);
  transform: translateY(-2px);
}

.save-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* ==================== BOTTOM NAVIGATION ==================== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 72px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 8px 0;
  z-index: 1000;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.bottom-nav.hide {
  transform: translateY(100%);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0px;
  text-decoration: none;
  color: var(--text-light);
  font-size: 12px;
  font-weight: 500;
  transition: all 0.2s ease;
  padding: 4px 8px;
  border-radius: var(--radius-full);
}

.nav-item i {
  font-size: 24px;
  transition: all 0.2s ease;
}

.nav-item.active {
  color: var(--primary);
}

.sell-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-top: -10px;
  text-decoration: none;
  z-index: 10;
}

.sell-circle {
  width: 50px;
  height: 50px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  transition: transform 0.2s ease;
}

.sell-circle:hover {
  transform: scale(1.1);
}

.sell-circle i {
  font-size: 28px;
  color: white;
}

/* ==================== SHRINK HEADER ANIMATION ==================== */
.profile-header.shrink {
  padding: var(--spacing-md) var(--spacing-lg);
}

.profile-header.shrink .profile-pic {
  width: 60px;
  height: 60px;
  margin-bottom: var(--spacing-xs);
}

.profile-header.shrink .profile-pic i {
  font-size: 2rem;
}

.profile-header.shrink #profileNameText {
  font-size: 1.1rem;
}

.profile-header.shrink p {
  font-size: 0.85rem;
  margin-bottom: var(--spacing-md);
}

/* ==================== UTILITY CLASSES ==================== */
.hidden {
  display: none !important;
}

/* ==================== LOADING STATES ==================== */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-full);
  border-top-color: white;
  animation: spin 0.8s linear infinite;
  margin-right: 8px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ==================== RESPONSIVE DESIGN ==================== */
@media (max-width: 768px) {
  .profile-container {
    padding: var(--spacing-xs);
  }
  
  .listings-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: var(--spacing-sm);
  }
  
  .profile-buttons {
    flex-direction: column;
    gap: var(--spacing-sm);
  }
  
  .edit-btn, .logout-btn {
    width: 100%;
    min-width: auto;
  }
  
  .edit-buttons {
    flex-direction: column;
  }
  
  .profile-edit {
    padding: var(--spacing-lg);
  }
}

@media (max-width: 480px) {
  .profile-pic {
    width: 100px;
    height: 100px;
  }
  
  .profile-pic i {
    font-size: 3rem;
  }
  
  .listings-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .bottom-nav {
    padding: var(--spacing-xs) 0;
  }
  
  .nav-item {
    font-size: 0.75rem;
    min-width: 50px;
  }
  
  .nav-item i {
    font-size: 1.2rem;
  }
}

/* ==================== ACCESSIBILITY ==================== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

:focus-visible {
  outline: 2px solid var(--brand-orange);
  outline-offset: 2px;
}

/* ==================== PRINT STYLES ==================== */
@media print {
  .bottom-nav,
  .edit-btn,
  .logout-btn,
  .action-btn,
  .listing-actions {
    display: none !important;
  }
  
  .profile-container {
    max-width: 100%;
    padding: 0;
  }
  
  .profile-header,
  .user-listings,
  .profile-edit {
    box-shadow: none;
    border: 1px solid #ccc;
  }
}
#whatsappBtn {
    position: fixed;
    bottom: 125px;         /* Distance from bottom */
    right: 25px;          /* Distance from right */
    width: 50px;
    height: 50px;
    background-color: #25D366; /* Official WhatsApp green */
    color: white;
    border-radius: 50%;   /* Makes it circular */
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 32px;      /* Icon size */
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    z-index: 1000;
    transition: transform 0.2s;
}

#whatsappBtn:hover {
    transform: scale(1.1);  /* Slight hover zoom */
}

/* Footer styling */
.footer {
    text-align: center;
    padding: 15px 10px;       /* inner spacing */
    font-size: 0.9rem;
    color: #4b5563;           /* neutral gray text */
    background: #fff;         /* white background */
    border-top: 1px solid #e5e7eb; /* subtle top border */
    margin-top: 40px;         /* space from content above */
}

.footer a {
    color: #FF6701;           /* your orange brand color */
    text-decoration: none;
    font-weight: 600;
    margin: 0 6px;            /* space between links */
    transition: color 0.2s ease;
}

.footer a:hover {
    color: #E65A00;           /* darker orange on hover */
    text-decoration: underline;
}

/* 🔧 AGENT ROLE - Button & Badge */
.agent-btn {
  padding: var(--spacing-sm) var(--spacing-lg);
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 140px;
}

.agent-btn:hover {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(245, 158, 11, 0.3);
}

.agent-status-badge {
  padding: var(--spacing-sm) var(--spacing-lg);
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  color: #1e40af;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 140px;
  justify-content: center;
}