/* ============================================
   AUTH STYLES — Login/Signup Modal + Account
   ============================================ */

/* ---------- AUTH MODAL OVERLAY ---------- */
.auth-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-modal-overlay.open {
  display: flex;
}

/* ---------- AUTH MODAL ---------- */
.auth-modal {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 420px;
  padding: 40px 36px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  animation: authSlideIn 0.3s ease;
}

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

.auth-modal-close {
  position: absolute;
  top: 16px;
  right: 18px;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #999;
  cursor: pointer;
  line-height: 1;
}

.auth-modal-close:hover {
  color: #333;
}

/* ---------- AUTH HEADER ---------- */
.auth-header {
  text-align: center;
  margin-bottom: 28px;
}

.auth-header h2 {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  color: var(--primary);
  margin-bottom: 6px;
}

.auth-header p {
  font-size: 0.85rem;
  color: #838383;
}

/* ---------- GOOGLE BUTTON ---------- */
.auth-google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  background: #fff;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  color: #333;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-google-btn:hover {
  background: #f8f8f8;
  border-color: #ccc;
}

.auth-google-btn img {
  width: 20px;
  height: 20px;
}

/* ---------- DIVIDER ---------- */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: #b2b2b2;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e8e8e8;
}

/* ---------- FORM ---------- */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.auth-field label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.auth-field input {
  padding: 12px 14px;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}

.auth-field input:focus {
  border-color: var(--accent);
}

.auth-submit {
  padding: 14px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 4px;
}

.auth-submit:hover {
  background: #2a2a4e;
}

.auth-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ---------- AUTH FOOTER LINKS ---------- */
.auth-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 0.82rem;
  color: #838383;
}

.auth-footer a,
.auth-footer button {
  color: var(--accent);
  background: none;
  border: none;
  font-size: inherit;
  font-family: inherit;
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
}

.auth-footer a:hover,
.auth-footer button:hover {
  text-decoration: underline;
}

.auth-error {
  color: #d32f2f;
  font-size: 0.8rem;
  text-align: center;
  padding: 8px;
  background: #fdecea;
  border-radius: 8px;
  display: none;
}

.auth-error.visible {
  display: block;
}

.auth-success {
  color: #2e7d32;
  font-size: 0.8rem;
  text-align: center;
  padding: 8px;
  background: #edf7ed;
  border-radius: 8px;
  display: none;
}

.auth-success.visible {
  display: block;
}

/* ---------- NAVBAR AUTH BUTTONS ---------- */
.nav-login-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s;
}

.nav-login-btn:hover {
  background: var(--accent-light);
}

.nav-account-btn {
  display: none;  /* shown via JS when logged in */
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: transparent;
  color: var(--text-light);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}

.nav-account-btn:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.4);
}

.navbar.scrolled .nav-account-btn {
  color: var(--text-dark);
  border-color: #e0e0e0;
}

.navbar.scrolled .nav-account-btn:hover {
  background: var(--bg-light);
}

/* ---------- FAVORITE HEART BUTTON ---------- */
.listing-card-fav {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.85);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  transition: all 0.2s ease;
  font-size: 0.9rem;
  color: #999;
}

.listing-card-fav:hover {
  background: #fff;
  transform: scale(1.1);
}

.listing-card-fav.favorited {
  color: #e53935;
}

.listing-card-fav.favorited i {
  animation: heartPop 0.3s ease;
}

@keyframes heartPop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* ---------- SAVE SEARCH BUTTON ---------- */
.save-search-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: transparent;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.save-search-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.save-search-btn.saved {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(197, 165, 90, 0.08);
}

/* ---------- SCHEDULE SHOWING MODAL ---------- */
.showing-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 16px;
}

.showing-form .auth-field input,
.showing-form .auth-field textarea,
.showing-form .auth-field select {
  padding: 12px 14px;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
  resize: vertical;
}

.showing-form .auth-field textarea {
  min-height: 80px;
}

.showing-form .auth-field input:focus,
.showing-form .auth-field textarea:focus {
  border-color: var(--accent);
}

/* ---------- ACCOUNT PAGE ---------- */
.account-page {
  padding-top: 100px;
  min-height: 100vh;
  background: var(--bg-light);
}

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

.account-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid #e8e8e8;
}

.account-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.5rem;
  font-weight: 600;
  overflow: hidden;
}

.account-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.account-info h1 {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  color: var(--primary);
}

.account-info p {
  font-size: 0.85rem;
  color: #838383;
}

/* Tabs */
.account-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 28px;
  border-bottom: 1px solid #e8e8e8;
}

.account-tab {
  padding: 12px 20px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  border: none;
  background: none;
  color: #838383;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.2s;
}

.account-tab:hover {
  color: var(--primary);
}

.account-tab.active {
  color: var(--primary);
  border-bottom-color: var(--accent);
}

/* Tab content */
.account-tab-content {
  display: none;
}

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

/* Cards grid (favorites, recently viewed) */
.account-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

/* Saved searches list */
.saved-search-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: #fff;
  border-radius: 12px;
  margin-bottom: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.saved-search-info h4 {
  font-size: 0.95rem;
  color: var(--primary);
  margin-bottom: 4px;
}

.saved-search-info p {
  font-size: 0.75rem;
  color: #838383;
}

.saved-search-actions {
  display: flex;
  gap: 8px;
}

.saved-search-actions button {
  padding: 6px 12px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  background: #fff;
  font-size: 0.72rem;
  color: #838383;
  cursor: pointer;
  transition: all 0.2s;
}

.saved-search-actions button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Profile form */
.profile-form {
  max-width: 480px;
}

.profile-form .auth-field {
  margin-bottom: 16px;
}

.account-logout-btn {
  margin-top: 24px;
  padding: 10px 24px;
  background: transparent;
  border: 1px solid #e53935;
  color: #e53935;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
}

.account-logout-btn:hover {
  background: #e53935;
  color: #fff;
}

/* Empty state */
.account-empty {
  text-align: center;
  padding: 60px 20px;
  color: #838383;
}

.account-empty i {
  font-size: 2.5rem;
  margin-bottom: 16px;
  color: #ccc;
}

.account-empty h3 {
  font-size: 1.1rem;
  color: #555;
  margin-bottom: 8px;
}

.account-empty p {
  font-size: 0.85rem;
}

/* Showing requests list */
.showing-request-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 16px 20px;
  background: #fff;
  border-radius: 12px;
  margin-bottom: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.showing-request-info h4 {
  font-size: 0.95rem;
  color: var(--primary);
  margin-bottom: 4px;
}

.showing-request-info p {
  font-size: 0.78rem;
  color: #838383;
  margin-bottom: 2px;
}

.showing-status {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.showing-status.pending {
  background: #fff3e0;
  color: #ef6c00;
}

.showing-status.confirmed {
  background: #e8f5e9;
  color: #2e7d32;
}

@media (max-width: 768px) {
  .auth-modal {
    padding: 32px 24px;
  }

  .account-header {
    flex-direction: column;
    text-align: center;
  }

  .account-tabs {
    overflow-x: auto;
  }

  .account-cards-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- LISTING CARDS (account page) ---------- */
.account-page .listing-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 16px;
  cursor: pointer;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.account-page .listing-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.account-page .listing-card-img {
  position: relative;
  padding-bottom: 66%;
  overflow: hidden;
  border-radius: 16px 16px 0 0;
}

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

.account-page .listing-card-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--primary, #1a1a2e);
  color: #fff;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.account-page .listing-card-body {
  padding: 12px 14px 14px;
}

.account-page .listing-card-price {
  font-family: var(--font-heading, 'Playfair Display', serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--primary, #1a1a2e);
  margin-bottom: 4px;
}

.account-page .listing-card-meta {
  display: flex;
  gap: 12px;
  font-size: 0.78rem;
  color: #595959;
  margin-bottom: 6px;
}

.account-page .listing-card-address {
  font-size: 0.78rem;
  color: #838383;
  margin-bottom: 2px;
}

.account-page .listing-card-mls {
  font-size: 0.65rem;
  color: #b2b2b2;
  letter-spacing: 0.5px;
}
