/**
 * Sales Rep Frontend Styles
 * Styling for the Locate a Rep page components
 */

/* ===================================================================
   SALES REP MAP STYLES
   =================================================================== */

.sales-rep-map-container {
  position: relative;
  width: 100%;
  margin-bottom: 2rem;
}

.sales-rep-map {
  width: 100%;
  border-radius: 8px;
  border: 1px solid #ddd;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.map-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  z-index: 10;
}

.map-loading p {
  margin: 0;
  font-size: 16px;
  color: #666;
}

/* Info Window Styles */
.rep-info-window {
  max-width: 300px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.rep-info-window .rep-photo {
  text-align: center;
  margin-bottom: 10px;
}

.rep-info-window .rep-photo img {
  max-width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid #1a5f1a;
}

.rep-info-window .rep-details h4 {
  margin: 0 0 8px 0;
  font-size: 18px;
  font-weight: 600;
  color: #1a5f1a;
}

.rep-info-window .rep-details .company {
  margin: 0 0 8px 0;
  font-weight: 500;
  color: #333;
}

.rep-info-window .rep-details .address {
  margin: 0 0 12px 0;
  font-size: 14px;
  color: #666;
  line-height: 1.4;
}

.rep-info-window .contact-info {
  font-size: 14px;
}

.rep-info-window .contact-info p {
  margin: 4px 0;
}

.rep-info-window .contact-info a {
  color: #1a5f1a;
  text-decoration: none;
}

.rep-info-window .contact-info a:hover {
  text-decoration: underline;
}

/* ===================================================================
   STATE FILTER STYLES
   =================================================================== */

.sales-rep-filter {
  text-align: left;
}

.sales-rep-state-filter {
  display: inline-block;
}

.sales-rep-state-filter select {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: white;
  font-size: 16px;
  color: #333;
  min-width: 200px;
  cursor: pointer;
}

.sales-rep-state-filter select:focus {
  outline: none;
  border-color: #0073aa;
}

.sales-rep-state-filter select:hover {
  border-color: #0073aa;
}

/* ===================================================================
   REP LISTING STYLES
   =================================================================== */

.sales-rep-listing {
  max-width: 1200px;
  margin: 0 auto;
}

.no-reps-found {
  text-align: center;
  font-size: 18px;
  color: #666;
  padding: 3rem;
  background: #f9f9f9;
  border-radius: 8px;
  margin: 2rem 0;
}

/* State Groups & Accordion */
.state-group {
  margin-bottom: 3rem;
}

.sales-rep-accordion {
  width: 100%;
}

.accordion-item {
  width: 100%;
  margin-bottom: 1rem;
  overflow: unset;
}

.accordion-header {
  width: 100% !important;
  padding: 6px 4px 6px 10px !important;

  border: none !important;

  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;

  font-family: inherit;
  background-color: var(--e-global-color-7045b64) !important;
  border: 1px solid #cccccc !important;
  box-shadow: none !important;
}

/* button.accordion-header {
  border: none !important;
} */

.accordion-header:hover .state-title {
  text-decoration: underline;
}

.accordion-header.active {
  background-color: #008349 !important;
  color: white !important;
  border-color: #008349 !important;
}

.accordion-header .state-title {
  font-size: var(--n-accordion-title-font-size);
  color: #029d59 !important;
  margin: 0;
  text-transform: uppercase;
  font-family: var(--e-global-typography-87b48d8-font-family), Sans-serif;
  font-weight: var(--e-global-typography-87b48d8-font-weight);
}

.accordion-header.active .state-title {
  color: white !important;
}

/* Rep count removed per user request */

.accordion-header .accordion-icon {
  font-size: 20px;
  font-weight: bold;
  color: var(--n-accordion-title-normal-color);
  min-width: 20px;
  text-align: center;
  transition: transform 0.3s ease;
  display: none;
  padding-top: 6px !important;
  padding-bottom: 6px !important;
}

.accordion-header.active .accordion-icon {
  color: white !important;
}

.sales-rep-accordion .accordion-content {
  display: none;
  padding: 1.2rem 0;
  background: white;
}

.state-title {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Rep Grid */
.reps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 1.5rem;
}

/* Rep Cards */
.rep-card {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0px 5px 12px -5px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
}

.rep-card::before {
  content: "";
}

/* Hover effects removed per user request */

.rep-card .rep-photo {
  text-align: center;
  margin-bottom: 1rem;
}

.rep-card .rep-photo img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 8%;
  border: 1px solid #e0e0e0;
}

.rep-card .rep-info {
  text-align: center;
}

.rep-card .rep-name {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 0.1rem 0;
}

.rep-card .rep-company {
  font-size: 18px;
  font-weight: 600;
  color: #555;
  margin: 0 0 1rem 0;
}

.rep-card .rep-bio {
  font-size: 14px;
  max-width: 80%;
  margin: 0 auto;
}

.rep-card .rep-address {
  font-size: 14px;
  color: rgb(102, 102, 102);
  line-height: 1.5;
  margin-bottom: 1rem;
  padding-top: 0.3rem;
  /* background: #f6f6f6; */
  border-radius: 6px;
}

.rep-card .rep-contact {
  text-align: left;
  border-top: 1px solid #f6f6f6;
  padding-top: 1rem;
}

.rep-card .rep-contact p {
  margin: 0.5rem 0;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 0;
}

.rep-card .rep-contact strong {
  min-width: 80px;
  color: #333;
  font-weight: 600;
}

.rep-card .rep-contact a {
  color: #008349;
  text-decoration: none;
  transition: color 0.3s ease;
  font-size: 14px;
}

.rep-card .rep-contact a:hover {
  color: #008349;
  text-decoration: underline;
}

/* Rep Website Link */
.rep-card .rep-website a {
  display: inline-block;
  background: #008349;

  border-radius: 6px 6px 6px 6px;
  padding: 13px 56px;

  font-size: 15px;
  text-transform: uppercase;

  margin-top: 0.5rem;

  font-family: "Raleway", Sans-serif !important;
  font-weight: 400 !important;
  text-transform: uppercase !important;
  text-decoration: none !important;
  color: #fff !important;
}

.rep-card .rep-website a:hover {
  background: #0d4a0d;
  color: white;
  text-decoration: none;
}

/* ===================================================================
   RESPONSIVE STYLES
   =================================================================== */

@media (max-width: 768px) {
  .reps-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .rep-card {
    padding: 1rem;
  }

  .rep-card .rep-name {
    font-size: 20px;
  }

  .sales-rep-state-filter select {
    width: 100%;
    max-width: none;
  }

  .state-title {
    font-size: 20px;
  }
}

@media (max-width: 480px) {
  .rep-card .rep-contact {
    text-align: center;
  }

  .rep-card .rep-contact p {
    flex-direction: column;
    gap: 0.25rem;
  }

  .rep-card .rep-contact strong {
    min-width: auto;
  }

  .sales-rep-map {
    height: 300px !important;
  }
}

/* ===================================================================
   BIO MODAL STYLES
   =================================================================== */

/* Bio Link */
.rep-bio-link {
  display: inline-block;
  color: #008349;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 0.5rem 0;
  transition: color 0.3s ease;
}

.rep-bio-link:hover {
  color: #029d59;
  text-decoration: underline;
}

/* Modal Overlay */
.rep-bio-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
}

.rep-bio-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px);
}

/* Modal Content */
.rep-bio-modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  border-radius: 0;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  width: 90%;
  max-width: 700px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  text-align: left;
}

/* Modal Header with Title */
.rep-bio-modal-content h3 {
  margin: 0;
  padding: 1.5rem 3rem 1rem 1.5rem;
  font-size: 24px;
  font-weight: 700;
  color: #008349;
  border-bottom: 2px solid #f0f0f0;
  flex-shrink: 0;
}

/* Close Button */
.rep-bio-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s ease;
  z-index: 10;
  text-decoration: none;
}

.rep-bio-modal-close svg {
  width: 24px;
  height: 24px;
  fill: #000;
  transition: all 0.2s ease;
  margin-top: -26px;
}

.rep-bio-modal-close:hover {
  background: rgba(0, 0, 0, 0.05);
}

.rep-bio-modal-close:hover svg {
  fill: #333;
}

.rep-bio-modal-close:active {
  background: rgba(0, 0, 0, 0.1);
}

/* Modal Body - Scrollable */
.rep-bio-modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
  font-size: 15px;
  line-height: 1.7;
  color: #333;
}

/* Scrollbar Styling */
.rep-bio-modal-body::-webkit-scrollbar {
  width: 8px;
}

.rep-bio-modal-body::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.rep-bio-modal-body::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

.rep-bio-modal-body::-webkit-scrollbar-thumb:hover {
  background: #a1a1a1;
}

/* Modal Body Content Styles */
.rep-bio-modal-body p {
  margin: 0 0 1rem 0;
}

.rep-bio-modal-body p:last-child {
  margin-bottom: 0;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .rep-bio-modal-content {
    width: 95%;
    max-height: 90vh;
  }

  .rep-bio-modal-content h3 {
    font-size: 20px;
    padding: 1.25rem 3rem 0.75rem 1.25rem;
  }

  .rep-bio-modal-body {
    padding: 1.25rem;
    font-size: 14px;
  }

  .rep-bio-modal-close {
    top: 0.75rem;
    right: 0.75rem;
  }
}

@media (max-width: 480px) {
  .rep-bio-modal-content h3 {
    font-size: 18px;
    padding: 1rem 2.5rem 0.5rem 1rem;
  }

  .rep-bio-modal-body {
    padding: 1rem;
  }

  .rep-bio-modal-close {
    width: 28px;
    height: 28px;
  }

  .rep-bio-modal-close svg {
    width: 20px;
    height: 20px;
  }
}
