/* Report Retailer - Main Stylesheet */
/* Converted from Angular SCSS components to unified CSS */

/* Base Styles */
html {
  font-size: 14px;
  position: relative;
  min-height: 100%;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  margin-bottom: 60px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Bootstrap 5 Focus Styles */
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

/* Layout Components */
.footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  white-space: nowrap;
  line-height: 60px;
}

.footer-logo {
  height: 30px;
}

/* Theme System - Converted from Angular themes.scss with App Wrapper support */
:root {
  --primary-color: #007bff;
  --secondary-color: #6c757d;
  --success-color: #28a745;
  --danger-color: #dc3545;
  --warning-color: #ffc107;
  --info-color: #17a2b8;
  --light-color: #f8f9fa;
  --dark-color: #343a40;
  --border-radius: 4px;
  --border-radius-lg: 8px;
}

/* Theme variants (converted from Angular AppComponent theme management) */
.theme-default {
  --primary-color: #007bff;
  --secondary-color: #6c757d;
  --accent-color: #007bff;
}

.theme-hm {
  --primary-color: #e31837;
  --secondary-color: #333333;
  --accent-color: #e31837;
}

.theme-guardian {
  --primary-color: #052962;
  --secondary-color: #4bc6df;
  --accent-color: #052962;
}

.theme-ft {
  --primary-color: #ff6d9d;
  --secondary-color: #333333;
  --accent-color: #ff6d9d;
}

/* Apply theme colors globally - Consolidated button styles */
.btn-primary, .btn-voucher {
  background-color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  color: white !important;
  padding: 10px 30px;
  border-radius: var(--border-radius);
  font-weight: 500;
  height: 38px;
  padding-top: 0.375rem;
  padding-bottom: 0.375rem;
  line-height: 1.5;
  vertical-align: middle;
}

.btn-primary:hover, .btn-voucher:hover {
  background-color: var(--accent-color) !important;
  border-color: var(--accent-color) !important;
  filter: brightness(0.9);
}

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

/* Home Component Styles */
.home-component {
  padding: 40px 0;
}

.home-component .imovologo {
  max-width: 300px;
  height: auto;
}

.home-component .card {
  border: none;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Cards use the hover-lift utility class now */

.home-component .fa-3x {
  font-size: 3rem;
}

/* FIX: Home page card layout */
.home-component .row.mt-5 {
  display: flex;
  justify-content: center;
  gap: 30px; /* Adds consistent spacing between cards */
}

.home-component .row.mt-5 > div {
  flex: 0 0 auto;
  width: 340px; /* Fixed width for consistent card sizing */
  max-width: 100%;
}

@media (max-width: 767px) {
  .home-component .row.mt-5 {
    gap: 15px;
  }
  .home-component .row.mt-5 > div {
    width: 100%;
  }
}

/* Voucher Component Styles - Converted from voucher.scss */
.voucher-component {
  margin: auto;
  font-weight: 300;
  max-width: 800px;
  padding: 20px;
}

.voucher-title {
  margin-top: 20px;
  margin-bottom: 10px;
  font-size: 30px;
  text-align: center;
}

.imovologo {
  display: block;
  margin: 0 auto 20px auto;
  max-width: 300px;
  height: auto;
}

.subtitle {
  text-align: center;
  font-size: 24px;
  margin-bottom: 30px;
  color: var(--primary-color);
}

/* Report Retailer Form Styles */
.report-retailer-form {
  background: #f8f9fa;
  padding: 30px;
  border-radius: var(--border-radius-lg);
  margin-bottom: 30px;
}

.form-group {
  margin-bottom: 1rem;
}

.form-control {
  border-radius: var(--border-radius);
}

/* Store List Styles - Converted from map.component.scss */
.store-list {
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid #dee2e6;
  border-radius: 4px;
}

/* Hide the actual radio button */
.store-radio {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

/* Store item as label */
.store-item {
  display: block;
  padding: 15px;
  border-bottom: 1px solid #dee2e6;
  cursor: pointer;
  transition: all 0.2s ease;
  background: white;
}

.store-item:hover {
  background-color: #f8f9fa;
  border-left: 4px solid var(--primary-color);
}

.store-item:last-child {
  border-bottom: none;
}

/* Focus state for keyboard navigation */
.store-radio:focus + .store-item {
  outline: 3px solid rgba(0, 123, 255, 0.25);
  outline-offset: 2px;
  border-left: 4px solid var(--primary-color);
}

/* Selected state for radio buttons (voucher page) */
.store-radio:checked + .store-item {
  background-color: #e3f2fd;
  border-left: 4px solid var(--primary-color);
}

/* Selected state for regular divs (map page) */
.store-item.selected {
  background-color: #e3f2fd;
  border-left: 4px solid var(--primary-color);
}

/* Active/clicking state */
.store-item:active {
  transform: scale(0.98);
}

.store-details {
  color: #6c757d;
  font-size: 0.9em;
}

/* Navigation Styles - Converted from navmenu.scss */
.navbar-brand {
  font-weight: 600;
  color: var(--primary-color) !important;
}

.nav-link {
  font-weight: 500;
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--primary-color) !important;
}

.nav-link.active {
  color: var(--primary-color) !important;
  font-weight: 600;
}

/* Modal Styles */
.modal-content {
  border-radius: 8px;
  border: none;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.modal-header {
  background-color: var(--primary-color);
  color: white;
  border-radius: 8px 8px 0 0;
}

.modal-header .btn-close {
  filter: invert(1);
}

/* Form Validation Styles */
.was-validated .form-control:invalid {
  border-color: var(--danger-color);
}

.was-validated .form-control:valid {
  border-color: var(--success-color);
}

.invalid-feedback {
  color: var(--danger-color);
}

.valid-feedback {
  color: var(--success-color);
}

/* Essential Utility Classes */
.clickable {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

/* Reusable hover effects */
.hover-lift {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

/* Loading States */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.spinner-border-sm {
  width: 1rem;
  height: 1rem;
}

/* Error States */
.error-message {
  color: var(--danger-color);
  font-size: 0.875em;
  margin-top: 0.25rem;
}

.alert {
  border-radius: 4px;
  padding: 12px 16px;
}

/* Map Component Styles - Complete Angular MapComponent conversion */
.store-map-component {
  min-height: 600px;
}

.store-map-component .store-sidebar {
  max-height: 600px;
  overflow-y: auto;
  padding: 15px;
  background-color: #f8f9fa;
  border-radius: 8px;
}

.store-result-item {
  padding: 12px;
  border-bottom: 1px solid #dee2e6;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 4px;
  margin-bottom: 8px;
  background-color: white;
}

.store-result-item:hover {
  background-color: #e3f2fd;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.store-result-item.highlighted {
  background-color: var(--primary-color);
  color: white;
  border-left: 4px solid var(--accent-color);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.store-result-item.highlighted .store-postcode,
.store-result-item.highlighted small {
  color: #e3f2fd !important;
}

.store-address {
  margin-bottom: 4px;
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

.store-postcode {
  margin-bottom: 2px;
  color: #666;
  font-size: 13px;
}

.info-window {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.4;
  padding: 4px;
}

.info-window h6 {
  margin-bottom: 6px;
  color: #333;
  font-size: 14px;
  font-weight: 600;
}

.info-window p {
  margin-bottom: 3px;
  color: #666;
  font-size: 13px;
}

.info-window small {
  color: #888;
  font-size: 12px;
  line-height: 1.3;
}

/* Map controls styling */
#map {
  border-radius: 8px;
  border: 1px solid #dee2e6;
}

/* Search form styling */
.store-sidebar .card {
  border: none;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.store-sidebar .card-body {
  padding: 15px;
}

.postcode-input {
  border-radius: 6px;
  border: 1px solid #ced4da;
  padding: 8px 12px;
  font-size: 14px;
}

.postcode-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(33, 150, 243, 0.25);
}

.postcode-input.is-invalid {
  border-color: #dc3545;
}

.postcode-input.is-valid {
  border-color: #28a745;
}

/* Footer navigation styles */
.btn-footer-map {
  padding: 8px 16px;
  font-size: 14px;
  border-radius: 4px;
}

.btn-list-map, .btn-list-view {
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  color: #495057;
}

.btn-list-map:hover, .btn-list-view:hover {
  background-color: #e9ecef;
  border-color: #adb5bd;
}

.btn-list-map.btn-primary, .btn-list-view.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
  .voucher-component {
    padding: 15px;
  }
  
  .report-retailer-form {
    padding: 20px;
  }
  
  .btn-voucher {
    width: 100%;
    margin-bottom: 10px;
  }
  
  .store-list {
    max-height: 300px;
  }

  .home-component .card {
    margin-bottom: 20px;
  }
}

@media (max-width: 991.98px) {
  .store-map-component .container-fluid {
    padding: 10px;
  }
  
  .store-map-component .store-sidebar {
    margin-top: 20px;
    max-height: 400px;
  }
  
  #map {
    height: 400px !important;
  }
}

@media (max-width: 767.98px) {
  .store-result-item {
    padding: 10px;
  }
  
  .store-address {
    font-size: 13px;
  }
  
  .store-postcode {
    font-size: 12px;
  }
}

/* Alert styling enhancements */
.store-results .alert {
  border-radius: 6px;
  font-size: 14px;
  margin-bottom: 0;
}

.store-results .alert-warning {
  background-color: #fff3cd;
  border-color: #ffecb5;
  color: #856404;
}

.store-results .alert-info {
  background-color: #d1ecf1;
  border-color: #bee5eb;
  color: #0c5460;
}

/* Print Styles */
@media print {
  .navbar, .footer, .btn, .modal {
    display: none !important;
  }
}

/* Style the Google Maps info windows */
.gm-style .gm-style-iw-c {
    padding: 8px !important;
}

.gm-style .gm-style-iw-d {
    overflow: hidden !important;
}
/* Remove unwanted padding in the info window */
.gm-style-iw {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}
/* Style for store info window content */
.store-info-window {
    padding: 0;
    margin: 0;
}

.store-info-window h6 {
    margin-top: 0;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.store-info-window p {
    margin-bottom: 4px;
    color: #666;
}

.store-info-window small {
    color: #888;
    display: block;
    margin-bottom: 4px;
}

.store-info-window .btn-outline-success {
    border: 1px solid #28a745;
    color: #28a745;
    background-color: transparent;
    transition: all 0.3s ease;
}

.store-info-window .btn-outline-success:hover {
    background-color: #28a745;
    color: white;
}