/**
 * Edwards Homes Branding Overrides
 * Applies Edwards Homes corporate brand identity to the application
 * Based on design language from edwardshomes.com
 */

/* ========================================
   TYPOGRAPHY - GOOGLE FONTS IMPORT
   ======================================== */

/* Import Playfair Display for elegant headers */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700;800&display=swap');

/* Keep Manrope for body text (already imported in base theme) */

/* ========================================
   CSS CUSTOM PROPERTIES (VARIABLES)
   ======================================== */

:root {
  /* Edwards Homes Brand Colors */
  --eh-primary-blue: #0054a6;
  --eh-gold-accent: #d4af37;
  --eh-dark-text: #2c3e50;
  --eh-light-gray: #f8f9fa;
  --eh-medium-gray: #6c757d;
  --eh-border-gray: #dee2e6;

  /* Button hover states */
  --eh-primary-hover: #003d7a;
  --eh-gold-hover: #b8941f;

  /* Status colors (keep from current system) */
  --eh-success: #28a745;
  --eh-info: #17a2b8;
  --eh-warning: #ffc107;
  --eh-danger: #dc3545;
}

/* ========================================
   PRIMARY BRAND COLOR OVERRIDES
   ======================================== */

/* Primary buttons - Edwards Homes Blue */
.btn-primary {
  background-color: var(--eh-primary-blue) !important;
  border-color: var(--eh-primary-blue) !important;
  color: #ffffff !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background-color: var(--eh-primary-hover) !important;
  border-color: var(--eh-primary-hover) !important;
}

/* Badge primary - Edwards Homes Blue */
.badge-primary,
.badge.badge-primary {
  background-color: var(--eh-primary-blue) !important;
  color: #ffffff !important;
}

/* Links - Edwards Homes Blue (except buttons) */
a:not(.btn),
.text-primary {
  color: var(--eh-primary-blue) !important;
}

a:not(.btn):hover {
  color: var(--eh-primary-hover) !important;
}

/* ========================================
   GOLD ACCENT ELEMENTS
   ======================================== */

/* Success buttons - use gold for special actions */
.btn-success {
  background-color: var(--eh-gold-accent) !important;
  border-color: var(--eh-gold-accent) !important;
  color: #2c3e50 !important;
  font-weight: 600;
}

.btn-success:hover,
.btn-success:focus {
  background-color: var(--eh-gold-hover) !important;
  border-color: var(--eh-gold-hover) !important;
}

/* Outline buttons - readable text, not gray-ghosted (fixes "looks disabled").
   Round 2: bumped border-width and font-weight so buttons read as enabled. */
.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-danger,
.btn-outline-warning,
.btn-outline-info,
.btn-outline-success {
  border-width: 2px !important;
  font-weight: 500 !important;
}
.btn-outline-secondary {
  color: #343a40 !important;
  border-color: #6c757d !important;
  background-color: transparent !important;
}
.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
  color: #fff !important;
  background-color: #6c757d !important;
  border-color: #6c757d !important;
}
.btn-outline-primary {
  color: var(--eh-primary-blue) !important;
  border-color: var(--eh-primary-blue) !important;
  background-color: transparent !important;
}
.btn-outline-primary:hover,
.btn-outline-primary:focus {
  color: #fff !important;
  background-color: var(--eh-primary-blue) !important;
}
.btn-outline-danger {
  color: #c92a2a !important;
  border-color: #c92a2a !important;
  background-color: transparent !important;
}
.btn-outline-danger:hover,
.btn-outline-danger:focus {
  color: #fff !important;
  background-color: #c92a2a !important;
}
.btn-outline-warning {
  color: #856404 !important;
  border-color: #d39e00 !important;
  background-color: transparent !important;
}
.btn-outline-warning:hover,
.btn-outline-warning:focus {
  color: #fff !important;
  background-color: #d39e00 !important;
  border-color: #d39e00 !important;
}

/* Badges - readable contrast (round 2 fix for nearly-invisible badge-light) */
.badge.badge-light {
  background-color: #e9ecef !important;
  color: #495057 !important;
  border: 1px solid #ced4da !important;
}
.badge.badge-secondary {
  background-color: #6c757d !important;
  color: #fff !important;
}
.badge.badge-info {
  background-color: #17a2b8 !important;
  color: #fff !important;
}
.badge.badge-warning {
  background-color: #ffc107 !important;
  color: #212529 !important;
}
.badge.badge-danger {
  background-color: #dc3545 !important;
  color: #fff !important;
}
.badge.badge-primary {
  background-color: var(--eh-primary-blue) !important;
  color: #fff !important;
}

/* Badge success - Gold accent */
.badge-success,
.badge.badge-success {
  background-color: var(--eh-gold-accent) !important;
  color: #2c3e50 !important;
  font-weight: 600;
}

/* Admin badge - Gold */
.badge.badge-success {
  background-color: var(--eh-gold-accent) !important;
}

/* ========================================
   TYPOGRAPHY OVERRIDES
   ======================================== */

/* Card titles - Elegant serif headers */
.card-title,
h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', Georgia, serif !important;
  font-weight: 600;
  color: var(--eh-dark-text);
}

/* Body text - Keep Manrope */
body,
p,
.card-description,
.info-label,
.info-value,
input,
select,
button,
.form-control {
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Vendor theme sets .form-control { line-height: 1 } and a tight min-height
   which collapses textareas so the rows="4" attribute does nothing. Restore
   normal line-height and let the rows attribute govern height again. */
textarea.form-control {
  line-height: 1.5 !important;
  min-height: 0 !important;
  height: auto;
}

/* Preserve icon fonts for Material Design Icons */
.mdi,
[class^="mdi-"],
[class*=" mdi-"] {
  font-family: 'Material Design Icons' !important;
}

/* Card title styling */
.card-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  letter-spacing: 0.5px;
}

/* ========================================
   CARD ENHANCEMENTS
   ======================================== */

/* Modern card styling with subtle shadow */
.card {
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 84, 166, 0.08);
  border: 1px solid var(--eh-border-gray);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.card:hover {
  box-shadow: 0 4px 16px rgba(0, 84, 166, 0.12);
  transform: translateY(-2px);
}

.card-body {
  padding: 1.75rem;
}

/* ========================================
   TABLE ENHANCEMENTS
   ======================================== */

/* Table styling */
.table-striped tbody tr:nth-of-type(odd) {
  background-color: rgba(0, 84, 166, 0.03);
}

.table thead th {
  background-color: var(--eh-light-gray);
  color: var(--eh-dark-text);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  border: none;
  border-bottom: 3px solid var(--eh-primary-blue);
  padding: 1rem;
}

.table td {
  vertical-align: middle;
  padding: 1rem;
  color: var(--eh-dark-text);
}

/* Table hover effect */
.table tbody tr:hover {
  background-color: rgba(0, 84, 166, 0.05);
}

/* ========================================
   FORM ELEMENTS
   ======================================== */

/* Input focus - Edwards Homes Blue */
.form-control:focus {
  border-color: var(--eh-primary-blue);
  box-shadow: 0 0 0 0.2rem rgba(0, 84, 166, 0.25);
}

/* Select dropdown */
select.form-control {
  border: 2px solid var(--eh-border-gray) !important;
  border-radius: 8px !important;
  padding: 1rem 1rem !important;
  background-color: #ffffff !important;
  color: var(--eh-dark-text) !important;
  min-height: 60px !important;
  line-height: 2.2 !important;
  height: auto !important;
}

select.form-control:focus {
  border-color: var(--eh-primary-blue) !important;
  box-shadow: 0 0 0 0.2rem rgba(0, 84, 166, 0.15) !important;
}

/* Select dropdown options - force dark text on white background */
select.form-control option {
  background-color: #ffffff !important;
  color: #2c3e50 !important;
  padding: 1rem 0.75rem !important;
  min-height: 50px !important;
  line-height: 2.2 !important;
  height: auto !important;
}

select.form-control option:hover {
  background-color: #e9ecef !important;
  color: #2c3e50 !important;
}

select.form-control option:checked,
select.form-control option[selected] {
  background-color: var(--eh-primary-blue) !important;
  color: #ffffff !important;
  font-weight: 600 !important;
}

/* ========================================
   PROPERTY INFO PANEL
   ======================================== */

.property-info {
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border-left: 4px solid var(--eh-primary-blue);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.property-info h5 {
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--eh-primary-blue);
  font-weight: 600;
  margin-bottom: 1rem;
}

.info-row {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--eh-border-gray);
}

.info-row:last-child {
  border-bottom: none;
}

.info-label {
  font-weight: 600;
  color: var(--eh-medium-gray);
  font-size: 0.95rem;
}

.info-value {
  color: var(--eh-dark-text);
  font-weight: 500;
}

/* ========================================
   STATUS CHANGE HIGHLIGHT
   ======================================== */

.status-change-highlight {
  background: linear-gradient(135deg, #fff9e6 0%, #fffbf0 100%);
  border: 2px solid var(--eh-gold-accent);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  text-align: center;
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.15);
}

.status-change-highlight h5 {
  color: #7d6a1f;
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  margin-bottom: 1rem;
}

.status-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  font-size: 1.1rem;
  margin-top: 1rem;
}

.status-badge {
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.status-badge.old {
  background: var(--eh-danger);
  color: white;
}

.status-badge.new {
  background: var(--eh-gold-accent);
  color: #2c3e50;
}

/* ========================================
   ACTION BUTTONS
   ======================================== */

.action-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.action-buttons button,
.action-buttons a {
  flex: 1;
  padding: 1rem 1.5rem;
  font-size: 1.05rem;
  border-radius: 8px;
  text-align: center;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.action-buttons button:hover,
.action-buttons a:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* ========================================
   BADGE STYLING
   ======================================== */

.badge {
  padding: 0.5rem 0.9rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.3px;
}

.badge-info,
.badge.badge-info {
  background-color: var(--eh-info);
  color: #ffffff;
}

/* Admin/User badges */
.card-title .badge {
  font-size: 0.8rem;
  vertical-align: middle;
  margin-left: 0.5rem;
}

/* ========================================
   SIDEBAR & NAVIGATION
   ======================================== */

/* Sidebar active menu items - Edwards Homes Blue */
.sidebar .nav-item.active > .nav-link {
  background-color: rgba(0, 84, 166, 0.1);
  color: var(--eh-primary-blue) !important;
}

.sidebar .nav-item .nav-link:hover {
  background-color: rgba(0, 84, 166, 0.05);
  color: var(--eh-primary-blue) !important;
}

/* ========================================
   MOBILE RESPONSIVENESS
   ======================================== */

@media (max-width: 768px) {
  .property-info {
    padding: 1.25rem;
  }

  .status-display {
    flex-direction: column;
    gap: 1rem;
  }

  .action-buttons {
    flex-direction: column;
  }

  .action-buttons button,
  .action-buttons a {
    width: 100%;
    padding: 1.25rem;
    font-size: 1.1rem;
  }

  .status-badge {
    padding: 1rem 2rem;
    font-size: 1.1rem;
  }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

.eh-text-blue {
  color: var(--eh-primary-blue) !important;
}

.eh-text-gold {
  color: var(--eh-gold-accent) !important;
}

.eh-bg-blue {
  background-color: var(--eh-primary-blue) !important;
}

.eh-bg-gold {
  background-color: var(--eh-gold-accent) !important;
}

/* Gradient backgrounds */
.eh-gradient-blue {
  background: linear-gradient(135deg, #0054a6 0%, #003d7a 100%);
}

.eh-gradient-gold {
  background: linear-gradient(135deg, #d4af37 0%, #b8941f 100%);
}
