/* ==========================================================================
   C2R REALTY - REUSABLE COMPONENTS
   ========================================================================== */

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-normal);
  white-space: nowrap;
  user-select: none;
  text-decoration: none;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--c2r-gold-metallic);
  color: var(--c2r-navy-primary);
  border-color: var(--c2r-gold-metallic);
  box-shadow: 0 2px 6px rgba(91, 155, 213, 0.2);
}

.btn-primary:hover {
  background: var(--c2r-gold-champagne);
  border-color: var(--c2r-gold-champagne);
  color: var(--c2r-navy-primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-gold);
}

.btn-navy {
  background: var(--c2r-navy-primary);
  color: var(--c2r-white);
  border-color: var(--c2r-navy-primary);
}

.btn-navy:hover {
  background: var(--c2r-navy-deep);
  border-color: var(--c2r-navy-deep);
  color: var(--c2r-gold-champagne);
  transform: translateY(-1px);
}

.btn-outline-navy {
  background: transparent;
  color: var(--c2r-navy-primary);
  border-color: var(--c2r-navy-primary);
}

.btn-outline-navy:hover {
  background: var(--c2r-navy-primary);
  color: var(--c2r-white);
}

.btn-outline-gold {
  background: transparent;
  color: var(--c2r-gold-metallic);
  border-color: var(--c2r-gold-metallic);
}

.btn-outline-gold:hover {
  background: var(--c2r-gold-metallic);
  color: var(--c2r-navy-primary);
}

.btn-outline-white {
  background: transparent;
  color: var(--c2r-white);
  border-color: rgba(255, 255, 255, 0.4);
}

.btn-outline-white:hover {
  background: var(--c2r-white);
  color: var(--c2r-navy-primary);
}

.btn-ghost {
  background: transparent;
  color: var(--c2r-text-primary);
}

.btn-ghost:hover {
  background: rgba(6, 27, 58, 0.05);
  color: var(--c2r-gold-metallic);
}

.btn-sm {
  padding: 0.45rem 0.9rem;
  font-size: var(--text-xs);
}

.btn-lg {
  padding: 0.9rem 2rem;
  font-size: var(--text-base);
  font-weight: 600;
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* --------------------------------------------------------------------------
   Badges & Tags
   -------------------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-xs);
  line-height: 1;
}

.badge-verified {
  background: var(--c2r-success-bg);
  color: var(--c2r-success);
  border: 1px solid rgba(91, 155, 213, 0.35);
}

.badge-luxury {
  background: rgba(91, 155, 213, 0.15);
  color: #0F2744;
  border: 1px solid rgba(91, 155, 213, 0.3);
  text-transform: none;
  letter-spacing: 0;
}

.badge-navy {
  background: var(--c2r-navy-primary);
  color: var(--c2r-gold-champagne);
}

.badge-outline {
  background: transparent;
  border: 1px solid var(--c2r-border);
  color: var(--c2r-text-secondary);
}

.badge-pill {
  border-radius: var(--radius-pill);
  padding: 0.3rem 0.8rem;
}

/* --------------------------------------------------------------------------
   Form Elements & Search Inputs
   -------------------------------------------------------------------------- */
.form-group {
  margin-bottom: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form-label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--c2r-text-primary);
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: var(--text-sm);
  color: var(--c2r-text-primary);
  background-color: var(--c2r-white);
  border: 1px solid var(--c2r-border);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  outline: none;
}

.form-control:focus {
  border-color: var(--c2r-gold-metallic);
  box-shadow: 0 0 0 3px var(--c2r-gold-glow);
}

.form-control::placeholder {
  color: var(--c2r-text-muted);
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23697586'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1rem;
  padding-right: 2.25rem;
}

/* --------------------------------------------------------------------------
   Property Cards (Flagship 99acres inspired with luxury elevated finish)
   -------------------------------------------------------------------------- */
.property-card {
  background: var(--c2r-white);
  border-radius: var(--radius-md);
  border: 1px solid var(--c2r-border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
}

.property-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(91, 155, 213, 0.4);
}

.property-card-media {
  position: relative;
  width: 100%;
  height: 240px;
  overflow: hidden;
  background-color: var(--c2r-navy-deep);
}

.property-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-smooth);
}

.property-card:hover .property-card-img {
  transform: scale(1.05);
}

.property-card-badges {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 2;
}

.property-card-fav {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c2r-navy-primary);
  border: none;
  transition: all var(--transition-fast);
  z-index: 2;
}

.property-card-fav:hover,
.property-card-fav.is-saved {
  background: var(--c2r-white);
  color: var(--c2r-danger);
  transform: scale(1.1);
}

.property-card-type-tag {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: rgba(6, 27, 58, 0.85);
  backdrop-filter: blur(4px);
  color: var(--c2r-gold-champagne);
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.property-card-content {
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  flex: 1;
}

.property-card-price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--space-2);
}

.property-card-price {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--c2r-navy-primary);
}

.property-card-emi {
  font-size: var(--text-xs);
  color: var(--c2r-text-secondary);
}

.property-card-title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--c2r-navy-primary);
  margin-bottom: var(--space-1);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.property-card-location {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  color: var(--c2r-text-secondary);
  margin-bottom: var(--space-4);
}

.property-card-specs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2);
  padding: var(--space-3) 0;
  border-top: 1px solid var(--c2r-border);
  border-bottom: 1px solid var(--c2r-border);
  margin-bottom: var(--space-4);
}

.spec-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.spec-label {
  font-size: 12px;
  color: var(--c2r-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.spec-value {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--c2r-navy-primary);
}

.property-card-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* List View Variant */
.property-card.list-view {
  flex-direction: row;
}

.property-card.list-view .property-card-media {
  width: 340px;
  min-width: 340px;
  height: auto;
}

/* --------------------------------------------------------------------------
   Interactive Modal System
   -------------------------------------------------------------------------- */
.c2r-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(6, 27, 58, 0.75);
  backdrop-filter: blur(5px);
  z-index: var(--z-backdrop);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.c2r-modal-backdrop.is-active {
  opacity: 1;
  pointer-events: auto;
}

.c2r-modal-backdrop:not(.is-active),
.c2r-modal-backdrop:not(.is-active) * {
  pointer-events: none;
}

body.c2r-modal-open {
  overflow: hidden;
}

.c2r-modal.post-property-modal {
  max-width: 760px;
}

.c2r-legal-modal {
  max-width: 760px;
  background: #EEF4FA;
  border: 0;
  padding: 0;
}

.c2r-legal-close {
  position: sticky;
  top: 12px;
  float: right;
  z-index: 3;
  margin: 12px 12px 0 0;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: #FFFFFF;
  color: #0B1F3A;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(11, 31, 58, 0.12);
}

.c2r-legal-close:hover {
  background: #FFFFFF;
  color: #163A5F;
}

.c2r-legal-doc {
  clear: both;
  padding: 28px 48px 48px;
  color: #0B1F3A;
}

.c2r-legal-kicker {
  margin: 0 0 6px;
  color: #163A5F;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.c2r-legal-firm {
  margin: 0 0 16px;
  font-family: var(--font-heading);
  font-size: 34px;
  font-weight: 600;
  line-height: 1.15;
  color: #0B1F3A;
}

.c2r-legal-intro {
  margin: 0 0 28px;
  max-width: 62ch;
  color: #1A334D;
  font-size: 15px;
  line-height: 1.65;
}

.c2r-legal-sec {
  margin: 0 0 8px;
}

.c2r-legal-sec h3 {
  margin: 0 0 8px;
  color: #0B1F3A;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 800;
}

.c2r-legal-sec p,
.c2r-legal-sec li {
  color: #1A334D;
  font-size: 14.5px;
  line-height: 1.65;
}

.c2r-legal-sec p {
  margin: 0 0 8px;
}

.c2r-legal-sec ul {
  margin: 0 0 8px;
  padding-left: 18px;
}

.c2r-legal-sec li {
  margin: 0 0 4px;
}

.c2r-legal-rule {
  display: block;
  width: 92px;
  height: 1px;
  margin: 16px 0 22px;
  background: #0B1F3A;
}

.c2r-legal-contact {
  margin: 8px 0 0;
  color: #163A5F;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.6;
}

@media (max-width: 640px) {
  .c2r-legal-doc {
    padding: 16px 22px 32px;
  }
  .c2r-legal-firm {
    font-size: 26px;
  }
}

.c2r-modal {
  background: var(--c2r-white);
  border-radius: var(--radius-lg);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  transform: translateY(20px) scale(0.96);
  transition: transform var(--transition-spring);
  position: relative;
  border: 1px solid var(--c2r-border);
}

.c2r-modal-backdrop.is-active .c2r-modal {
  transform: translateY(0) scale(1);
}

.c2r-modal-header {
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--c2r-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: var(--c2r-white);
  z-index: 2;
}

.c2r-modal-title {
  font-size: var(--text-2xl);
  font-family: var(--font-heading);
  color: var(--c2r-navy-primary);
}

.c2r-modal-close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c2r-text-secondary);
  font-size: 1.25rem;
  transition: all var(--transition-fast);
}

.c2r-modal-close:hover {
  background: var(--c2r-ivory-warm);
  color: var(--c2r-navy-primary);
}

.c2r-modal-body {
  padding: var(--space-6);
}

.c2r-modal-footer {
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--c2r-border);
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
  background: var(--c2r-ivory-warm);
}

/* --------------------------------------------------------------------------
   Toast Notifications
   -------------------------------------------------------------------------- */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  min-width: 320px;
  max-width: 420px;
  background: var(--c2r-navy-primary);
  color: var(--c2r-white);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--c2r-gold-metallic);
  box-shadow: var(--shadow-xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: var(--text-sm);
  transform: translateY(20px);
  opacity: 0;
  transition: all var(--transition-normal);
}

.toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}

/* --------------------------------------------------------------------------
   Tabs
   -------------------------------------------------------------------------- */
.nav-tabs {
  display: flex;
  gap: var(--space-2);
  border-bottom: 2px solid var(--c2r-border);
  overflow-x: auto;
  white-space: nowrap;
}

.nav-tab-btn {
  padding: 0.75rem 1.25rem;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--c2r-text-secondary);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition-fast);
}

.nav-tab-btn:hover {
  color: var(--c2r-navy-primary);
}

.nav-tab-btn.active {
  color: var(--c2r-navy-primary);
  border-bottom-color: var(--c2r-gold-metallic);
}

