/* =====================================================
   BIRDSOUQ FINAL CSS AUDIT
   Phase 7: Global cleanup

   Preserved:
   - Tested visual design and responsive breakpoints
   - RTL behavior and Safari sidebar fix
   - Animations and interactive states
   - Existing class names and JavaScript hooks

   Final audit:
   - Removed exact redundancy only within the same scope
   - Preserved intentional breakpoint overrides
   - Normalized documentation spacing
   - Validated CSS syntax and brace balance
===================================================== */

/* =====================================================
   BIRDSOUQ PROFILE STYLESHEET
   Phase 4 cleanup

   Preserved:
   - Existing class names and HTML hooks
   - Current desktop and mobile appearance
   - Profile status states
   - Modal behavior
   - Listing-card animations
===================================================== */

/* =====================================================
   PROFILE PAGE
===================================================== */

.profile-page {

    max-width:1200px;

    margin:50px auto 80px;

    padding:0 20px;
}

/* =====================================================
   HERO
===================================================== */

.profile-hero {

    text-align:center;

    margin-bottom:45px;
}

.profile-hero h1 {

    font-size:48px;

    font-weight:800;

    color:#172033;

    margin-bottom:12px;
}

.profile-hero p {

    color:#64748b;

    font-size:18px;
}

/* =====================================================
   PROFILE CARD
===================================================== */

.profile-card {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  align-items: center;
  gap: 50px;

  padding: 46px;

  background: #ffffff;
  border: 1px solid rgba(15, 118, 110, 0.12);
  border-radius: 28px;

  box-shadow:
    0 20px 45px rgba(15, 23, 42, 0.08);
}
.profile-avatar-column {
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-details {
  min-width: 0;
}

.profile-heading-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 25px;
}

.profile-heading-row h2 {
  margin: 14px 0 0;

  color: #172033;
  font-size: clamp(2rem, 4vw, 2.7rem);
  line-height: 1.15;
}

.profile-edit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  min-height: 46px;
  margin-top: 22px;
  padding: 14px 28px;

  border: none;
  border-radius: 14px;

  background: #0f766e;
  color: #ffffff;

  cursor: pointer;
  font-size: 16px;
  font-weight: 700;

  transition:
    background 0.25s ease,
    transform 0.25s ease;
}

.profile-edit-btn svg {
  width: 17px;
  height: 17px;
}

 .profile-info{

    display:flex;
    flex-direction:column;
    gap:16px;

}
/* =====================================================
   AVATAR
===================================================== */

.profile-avatar {

    position:relative;

    width:170px;
    height:170px;

    flex-shrink:0;
}

.profile-avatar img {

    width:100%;
    height:100%;

    object-fit:cover;

    border-radius:50%;

    border:6px solid #ffffff;

    background:#ecfdf5;

    box-shadow:
        0 12px 35px rgba(15,23,42,.12);
}

.change-photo-btn {

    position:absolute;

    left:50%;
    bottom:-22px;

    transform:translateX(-50%);

    padding:10px 18px;

    border:none;

    border-radius:999px;

    background:#0f766e;

    color:#fff;

    cursor:pointer;

    font-size:13px;

    font-weight:700;

    transition:.25s;
}

.change-photo-btn:hover {

    background:#115e59;
}

/* =====================================================
   PROFILE CONTENT
===================================================== */

.profile-content {

    flex:1;
}

.profile-badge {

    display:inline-flex;

    align-items:center;

    padding:8px 16px;

    margin-bottom:16px;

    border-radius:999px;

    background:#d1fae5;

    color:#047857;

    font-size:14px;

    font-weight:700;
}

.profile-content h2 {

    font-size:42px;

    color:#172033;

    margin-bottom:18px;
}

.profile-location,
.profile-member {

    display:flex;

    align-items:center;

    gap:10px;

    margin-bottom:14px;

    color:#64748b;

    font-size:17px;
}

.profile-location svg{

    color:#0f766e;

    width:18px;
    height:18px;
}

.profile-edit-btn:hover{

    background:#115e59;

    transform:translateY(-2px);
}

.profile-info-list {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: 18px;
  margin: 28px 0;
}

.profile-info-item {
  display: flex;
  align-items: center;
  gap: 13px;

  min-width: 0;
  padding: 15px 17px;

  background: #f8fbfa;
  border: 1px solid #e3efec;
  border-radius: 15px;

  color: #475569;
}

.profile-info-item svg {
  width: 20px;
  height: 20px;

  color: #0f766e;
  flex-shrink: 0;
}

.profile-info-item div {
  min-width: 0;
}

.profile-info-item small {
  display: block;
  margin-bottom: 4px;

  color: #7b8a99;
  font-size: 0.76rem;
  font-weight: 700;
}

.profile-info-item span {
  display: block;

  overflow-wrap: anywhere;

  color: #243247;
  font-size: 0.95rem;
  font-weight: 600;
}
.profile-contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.profile-contact-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;

  min-height: 48px;
  padding: 12px 22px;

  border-radius: 14px;

  text-decoration: none;
  font-weight: 700;

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.profile-contact-btn svg {
  width: 19px;
  height: 19px;
}

.profile-contact-btn.call {
  background: #0f766e;
  color: #ffffff;
}

.profile-contact-btn.whatsapp {
  background: #dcfce7;
  color: #15803d;
}

.profile-contact-btn:hover {
  transform: translateY(-2px);

  box-shadow:
    0 10px 24px rgba(15, 23, 42, 0.1);
}

.profile-contact-btn.disabled {
  opacity: 0.45;
  pointer-events: none;
}
/* =====================================================
   PROFILE STATUS BADGES
===================================================== */

.profile-role {

    display:inline-flex;
    align-items:center;

    padding:8px 16px;

    border-radius:999px;

    font-size:14px;
    font-weight:700;
}

/* Verified */

.profile-role.verified {

    background:#dcfce7;
    color:#15803d;
}

/* Pending */

.profile-role.pending {

    background:#fef3c7;
    color:#b45309;
}

/* Suspended */

.profile-role.suspended {

    background:#fee2e2;
    color:#dc2626;
}

/* Deleted */

.profile-role.deleted {

    background:#e5e7eb;
    color:#475569;
}

/* Administrator */

.profile-role.admin {

    background:#dbeafe;
    color:#1d4ed8;
}
/* =====================================================
   EDIT PROFILE MODAL
===================================================== */

.edit-profile-modal {

    width:min(460px,92vw);

    padding:32px;

    border-radius:24px;

    background:#fff;
}
@media (max-width: 768px) {

  .edit-profile-modal {
    width: calc(100% - 32px);
    max-width: 360px;
    padding: 22px 18px;
  }

  .edit-profile-modal .modal-actions {
    display: flex;
    width: 100%;
    gap: 10px;
  }

  .edit-profile-modal .modal-actions .primary-btn,
  .edit-profile-modal .modal-actions .secondary-btn {
    width: auto;
    flex: 1;
    min-width: 0;
  }

}
.edit-profile-modal h2 {

    margin-bottom:24px;

    text-align:center;
}

.form-group {

    display:flex;
    flex-direction:column;

    margin-bottom:18px;
}

.form-group label {

    margin-bottom:8px;

    font-weight:700;

    color:#0f172a;
}

.form-group input,
.form-group select{

    height:50px;

    padding:0 16px;

    border:1px solid #dbe4ee;

    border-radius:12px;

    font-size:15px;
}

.modal-actions {

    display:flex;

    justify-content:flex-end;

    gap:12px;

    margin-top:26px;
}

.modal-actions button {

    min-width:130px;
}
.modal-overlay {
    position: fixed;
    inset: 0;

    display: none;

    justify-content: center;
    align-items: center;

    background: rgba(0,0,0,.45);
    z-index: 9999;
}

.modal-overlay.active {
    display:flex;
}
/* =====================================================
   PROFILE STATISTICS
===================================================== */

.profile-statistics {
  display: grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));

  gap: 18px;
  margin: 28px 0 60px;
}

.profile-stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  min-height: 150px;
  padding: 22px;

  background: #ffffff;
  border: 1px solid #dce9e6;
  border-radius: 20px;

  text-align: center;

  box-shadow:
    0 12px 30px rgba(15, 23, 42, 0.06);
}

.profile-stat-card svg {
  width: 25px;
  height: 25px;

  margin-bottom: 12px;

  color: #0f766e;
}

.profile-stat-card strong {
  margin-bottom: 5px;

  color: #172033;
  font-size: 2rem;
}

.profile-stat-card span {
  color: #64748b;
  font-size: 0.9rem;
  font-weight: 600;
}
/* =====================================================
   PROFILE RECENT LISTINGS
===================================================== */

.profile-recent-section {
  width: min(1180px, calc(100% - 40px));
  margin: 40px auto 70px;
}

.profile-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.profile-section-heading span {
  color: #087f72;
  font-size: 0.85rem;
  font-weight: 700;
}

.profile-section-heading h2 {
  margin: 6px 0;
  color: #111b33;
  font-size: 2rem;
}

.profile-section-heading p {
  margin: 0;
  color: #64748b;
}

.profile-view-all-link {
  border: 1px solid #087f72;
  border-radius: 12px;
  padding: 11px 18px;
  color: #087f72;
  font-weight: 700;
  text-decoration: none;
}

.profile-view-all-link:hover {
  background: #087f72;
  color: #ffffff;
}

.profile-recent-listings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.profile-listing-card {
  position: relative;
  overflow: hidden;

  border: 1px solid #dce7e5;
  border-radius: 20px;

  background: #ffffff;
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.08);

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.profile-listing-card:hover {
  transform: translateY(-2px);
  border-color: #c9dfdb;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.1);
}

.profile-listing-image {
  height: 210px;
  overflow: hidden;
  background: #edf8f5;
}

.profile-listing-image img {
  width: 100%;
  height: 100%;

  object-fit: cover;

  transition: transform 0.25s ease;
}

.profile-listing-card:hover .profile-listing-image img {
  transform: scale(1.025);
}

.profile-listing-placeholder {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  font-size: 3rem;
}

.profile-listing-content {
  padding: 20px;
}

.profile-listing-content h3 {
  margin: 12px 0;

  color: #111b33;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.profile-listing-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 6px 11px;

  border-radius: 999px;

  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
}

.profile-listing-status.approved {
  background: #dcfce7;
  color: #15803d;
}

.profile-listing-status.pending {
  background: #fef3c7;
  color: #a16207;
}

.profile-listing-status.rejected {
  background: #fee2e2;
  color: #dc2626;
}

.profile-listing-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;

  color: #64748b;
  font-size: 0.9rem;
}

.profile-listing-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #edf2f2;
}

.profile-listing-footer strong {
  color: #087f72;
  font-weight: 800;
}

.profile-listing-footer a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;

  padding: 5px 8px;

  border-radius: 8px;

  background: #ecfdf5;
  color: #087f72;

  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
}

.profile-listing-footer a:hover {
  background: #dff7ef;
}

.profile-no-listings,
.profile-listings-loading {
  grid-column: 1 / -1;
  padding: 50px 20px;
  border: 1px dashed #b9d8d2;
  border-radius: 20px;
  text-align: center;
  color: #64748b;
}

.profile-no-listings span,
.profile-listings-loading span {
  display: block;
  margin-bottom: 10px;
  font-size: 2.5rem;
}

@media (max-width: 900px) {
  .profile-card {
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 30px;
    padding: 34px;
  }

  .profile-info-list {
    grid-template-columns: 1fr;
  }
}


.profile-listing-content h3 a {
  color: inherit;
  text-decoration: none;
}

.profile-phone-link {
  color: inherit;
  text-decoration: none;
}

.profile-phone-link:hover,
.profile-listing-content h3 a:hover {
  color: #0f766e;
}
/* =====================================================
   SELLER LISTINGS GRID
===================================================== */

.seller-listings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  align-items: start;
}

@media (max-width: 900px) {
  .seller-listings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


/* =====================================================
   AUTHORITATIVE MOBILE PROFILE LAYOUT
   Keep this as the final section in profile.css
===================================================== */

/* =====================================================
   OWNER PROFILE
   Hide buyer contact controls on the seller's own page.
===================================================== */

body.owner-profile .profile-contact-actions {
  display: none !important;
}


/* =====================================================
   SINGLE AUTHORITATIVE MOBILE PROFILE
   All profile-page mobile rules belong here.
===================================================== */

@media (max-width: 680px) {

  body {
    padding-bottom: 72px;
  }

  /* ---------------------------------------------
     PAGE + HERO
  --------------------------------------------- */

  .profile-page {
    margin: 12px auto 26px;
    padding: 0 10px;
  }

  .profile-hero {
    margin-bottom: 12px;
    padding: 12px 12px 10px;
  }

  .profile-hero h1 {
    margin-bottom: 3px;
    font-size: 28px;
    line-height: 1.1;
  }

  .profile-hero p {
    font-size: 11px;
    line-height: 1.4;
  }


  /* ---------------------------------------------
     PROFILE CARD
  --------------------------------------------- */

  .profile-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;

    padding: 16px 12px;

    text-align: center;
    border-radius: 18px;
  }

  .profile-avatar-column,
  .profile-details,
  .profile-info,
  .profile-content {
    width: 100%;
  }

  .profile-avatar {
    width: 92px;
    height: 92px;
  }

  .change-photo-btn {
    bottom: -12px;
    padding: 5px 9px;
    font-size: 8px;
  }

  .profile-heading-row {
    align-items: center;
    flex-direction: column;
    gap: 6px;
  }

  .profile-heading-row h2,
  .profile-content h2,
  .profile-info h2 {
    margin: 4px 0 0;
    font-size: 22px;
    line-height: 1.15;
  }

  .profile-role,
  .profile-badge {
    margin: 0 auto 3px;
    padding: 4px 9px;
    font-size: 9px;
  }

  .profile-edit-btn {
    width: 100%;
    min-height: 34px;
    margin-top: 6px;
    padding: 6px 10px;
    font-size: 10px;
  }


  /* ---------------------------------------------
     PROFILE INFORMATION
  --------------------------------------------- */

  .profile-info-list {
    grid-template-columns: 1fr;
    gap: 6px;
    margin: 10px 0 0;
    text-align: start;
  }

  .profile-info-item {
    gap: 7px;
    padding: 8px 9px;
    border-radius: 10px;
  }

  .profile-info-item svg {
    width: 15px;
    height: 15px;
  }

  .profile-info-item small {
    margin-bottom: 1px;
    font-size: 0.56rem;
  }

  .profile-info-item span {
    font-size: 0.72rem;
  }


  /* ---------------------------------------------
     STATISTICS
  --------------------------------------------- */

  .profile-statistics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    margin: 10px 0 8px;
  }

  .profile-stat-card {
    min-height: 70px;
    padding: 8px 5px;
    border-radius: 12px;
  }

  .profile-stat-card svg {
    width: 15px;
    height: 15px;
    margin-bottom: 2px;
  }

  .profile-stat-card strong {
    margin-bottom: 1px;
    font-size: 1rem;
    line-height: 1.05;
  }

  .profile-stat-card span {
    font-size: 0.58rem;
    line-height: 1.2;
  }


  /* ---------------------------------------------
     RECENT LISTINGS
  --------------------------------------------- */

  .profile-recent-section {
    width: 100%;
    margin: 6px auto 24px;
  }

  .profile-section-heading {
    align-items: center;
    gap: 7px;
    margin-bottom: 9px;
  }

  .profile-section-heading > div {
    min-width: 0;
  }

  .profile-section-heading span {
    font-size: 0.64rem;
  }

  .profile-section-heading h2 {
    margin: 1px 0;
    font-size: 1.18rem;
    line-height: 1.1;
  }

  .profile-section-heading p {
    font-size: 0.64rem;
    line-height: 1.3;
  }

  .profile-view-all-link {
    flex-shrink: 0;
    padding: 6px 8px;
    border-radius: 8px;
    font-size: 0.62rem;
  }

  .profile-recent-listings-grid,
  .seller-listings-grid {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .profile-listing-card {
    display: grid;
    grid-template-columns: 40% minmax(0, 1fr);
    min-height: 122px;
    border-radius: 13px;
  }

  .profile-listing-image {
    height: 100%;
    min-height: 122px;
  }

  .profile-listing-content {
    min-width: 0;
    padding: 8px;
  }

  .profile-listing-content h3 {
    margin: 4px 0;
    font-size: 0.8rem;
    line-height: 1.2;
  }

  .profile-listing-status {
    padding: 3px 7px;
    font-size: 0.62rem;
  }

  .profile-listing-meta {
    gap: 5px 7px;
    font-size: 0.64rem;
  }

  .profile-listing-footer {
    gap: 6px;
    margin-top: 7px;
    padding-top: 6px;
    font-size: 0.64rem;
  }

  .profile-no-listings,
  .profile-listings-loading {
    padding: 28px 14px;
    border-radius: 14px;
  }


  /* ---------------------------------------------
     LISTING CARD POLISH
  --------------------------------------------- */

  .profile-listing-card {
      overflow: hidden;

      border-color: #dce9e6;

      box-shadow:
        0 8px 20px rgba(15, 23, 42, 0.06);
    }

    .profile-listing-image {
      border-start-start-radius: 13px;
      border-end-start-radius: 13px;
    }

    .profile-listing-content {
      display: flex;
      flex-direction: column;
    }

    .profile-listing-status {
      align-self: flex-start;
    }

    .profile-listing-meta {
      margin-top: 1px;
    }

    .profile-listing-footer {
      margin-top: auto;
    }

    .profile-listing-footer a {
      padding: 4px 6px;
      font-size: 0.62rem;
    }
}


/* =====================================================
   VERY SMALL PROFILE SCREENS
===================================================== */

@media (max-width: 390px) {

  .profile-section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .profile-view-all-link {
    width: 100%;
    text-align: center;
  }

  .profile-listing-card {
    grid-template-columns: 39% minmax(0, 1fr);
  }
}
.owner-profile > h1,
.owner-profile > p {
  margin-left: 70px;
    margin-top: 10px;
}
/* =====================================================
   PROFILE TOAST
===================================================== */

.profile-toast {
  position: fixed;
  top: 24px;
  right: 24px;

  display: flex;
  align-items: center;
  gap: 10px;

  min-width: 260px;
  max-width: 360px;

  padding: 14px 16px;

  border-radius: 14px;
  background: #ffffff;

  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.14);

  opacity: 0;
  visibility: hidden;

  transform: translateY(-12px);

  transition:
    opacity 0.25s ease,
    transform 0.25s ease,
    visibility 0.25s ease;

  z-index: 10000;
}

.profile-toast.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.profile-toast.success {
  border-left: 4px solid #16a34a;
}

.profile-toast.error {
  border-left: 4px solid #dc2626;
}

.profile-toast.warning {
  border-left: 4px solid #f59e0b;
}

.profile-toast-icon {
  font-size: 18px;
  font-weight: 800;
}

.profile-toast-message {
  flex: 1;
  font-size: 14px;
  line-height: 1.4;
}

.profile-toast-close {
  border: 0;
  background: transparent;

  font-size: 20px;
  line-height: 1;

  cursor: pointer;
}


/* RTL */

html[dir="rtl"] .profile-toast {
  right: auto;
  left: 24px;
}


html[dir="rtl"] .profile-toast.success {
  border-left: 0;
  border-right: 4px solid #16a34a;
}

html[dir="rtl"] .profile-toast.error {
  border-left: 0;
  border-right: 4px solid #dc2626;
}

html[dir="rtl"] .profile-toast.warning {
  border-left: 0;
  border-right: 4px solid #f59e0b;
}
/* Mobile */

@media (max-width: 768px) {

  .profile-toast {
    top: 16px;
    right: 16px;
    left: 16px;

    min-width: 0;
    max-width: none;
  }

  html[dir="rtl"] .profile-toast {
    right: 16px;
    left: 16px;
  }
}