/**
 * @file
 * ILAS Hotspot module styles.
 */

.ilas-hotspot-container {
  position: relative;
  display: inline-block;
  max-width: 100%;
  width: auto;
  margin: 0;
  padding: 0;
}

.hotspot-background {
  max-width: 100%;
  height: auto;
  display: block;
}

.hotspot-item {
  position: absolute;
  z-index: 10;
}

.hotspot-trigger {
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.hotspot-trigger:hover {
  transform: scale(1.1);
}

.hotspot-trigger img {
  max-width: 100%;
  height: auto;
}

/* Mobile adjustments - proper breakpoints and touch targets */
@media (max-width: 768px) {
  .hotspot-trigger {
    width: 35px; /* Smaller touch target */
    height: 35px;
  }
}

@media (max-width: 576px) {
  .hotspot-trigger {
    width: 30px;
    height: 30px;
  }
}

/* Popover styling to match theme */
.popover {
  font-family: inherit;
  max-width: 350px;
}

.popover-header {
  font-family: inherit;
  font-weight: bold;
  font-size: 1.1rem;
  text-align: center;
}

/* Mobile font scaling for popover headers */
@media (max-width: 768px) {
  .popover-header {
    font-size: 1.7rem; /* Use subheader size */
  }
}

@media (max-width: 576px) {
  .popover-header {
    font-size: 1.7rem; /* Use subheader size */
  }
}

.popover-body {
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.5;
  text-align: center;
}

/* Mobile font scaling for popover body */
@media (max-width: 768px) {
  .popover-body {
    font-size: 1.1rem; /* Use body size */
  }
}

@media (max-width: 576px) {
  .popover-body {
    font-size: 1.1rem; /* Use body size */
  }
}

/* Category-specific popover header colors and borders */
/* Consumer Rights - Light Blue */
.popover.popover-consumer-rights {
  border: 2px solid #83ced3 !important;
}
.popover.popover-consumer-rights .popover-header {
  background-color: #83ced3;
  color: #000;
  border-bottom: 1px solid #83ced3;
}

/* Older Adults - Medium Blue */
.popover.popover-older-adults {
  border: 2px solid #3995c8 !important;
}
.popover.popover-older-adults .popover-header {
  background-color: #3995c8;
  color: #fff;
  border-bottom: 1px solid #3995c8;
}

/* Housing - Dark Blue */
.popover.popover-housing {
  border: 2px solid #41708c !important;
}
.popover.popover-housing .popover-header {
  background-color: #41708c;
  color: #fff;
  border-bottom: 1px solid #41708c;
}

/* Health - Pink */
.popover.popover-health {
  border: 2px solid #b7436a !important;
}
.popover.popover-health .popover-header {
  background-color: #b7436a;
  color: #fff;
  border-bottom: 1px solid #b7436a;
}

/* Individual Rights - Orange */
.popover.popover-individual-rights {
  border: 2px solid #e18137 !important;
}
.popover.popover-individual-rights .popover-header {
  background-color: #e18137;
  color: #fff;
  border-bottom: 1px solid #e18137;
}

/* Family - Yellow */
.popover.popover-family {
  border: 2px solid #fbc15d !important;
}
.popover.popover-family .popover-header {
  background-color: #fbc15d;
  color: #000;
  border-bottom: 1px solid #fbc15d;
}

/* Impact Table Layout */
.ilas-impact-wrapper {
  padding: 0;
  text-align: center;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
}

.ilas-impact-table {
  width: auto;
  margin: 0;
  border: none;
  border-spacing: 0;
  border-collapse: separate;
  table-layout: auto;
  height: 100%;
  max-width: 100%;
}

.ilas-impact-table td {
  vertical-align: middle;
  padding: 0 2rem 0 0;
  border: none;
  height: 100%;
}

.hotspot-cell {
  text-align: center;
  padding-left: 0;
}

.hotspot-cell .ilas-hotspot-container {
  margin-left: auto;
  margin-right: auto;
}

.annual-report-cell {
  text-align: center;
  padding-left: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  padding-right: 0;
}

.annual-report-content {
  max-width: 400px;
}

.annual-report-cover {
  transition: transform 0.3s ease;
  cursor: pointer;
  border: 6px solid #1263a0;
  border-radius: 4px;
  width: 100% !important;
  height: auto !important;
}

/* Mobile border adjustment */
@media (max-width: 768px) {
  .annual-report-cover {
    border: 3px solid #1263a0;
  }
}

@media (max-width: 576px) {
  .annual-report-cover {
    border: 3px solid #1263a0;
  }
}

.annual-report-cover:hover {
  transform: scale(1.05);
}

/* Responsive adjustments - proper mobile breakpoints */
@media (max-width: 1200px) {
  .ilas-impact-table {
    display: block;
  }
  
  .ilas-impact-table tr {
    display: block;
  }
  
  .ilas-impact-table td {
    display: block;
    text-align: center !important;
  }
  
  .annual-report-cell {
    margin-top: 2rem;
  }
}

/* Tablet specific adjustments */
@media (max-width: 768px) {
  .ilas-impact-wrapper {
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
  }
  
  .ilas-impact-table {
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  
  .hotspot-cell {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
  }
  
  .hotspot-cell .ilas-hotspot-container {
    display: flex;
    justify-content: center;
    margin: 0 auto;
  }
  
  .annual-report-cell {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 1rem;
    padding: 0;
  }
  
  .annual-report-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 380px;
    width: 380px;
    margin: 0 auto;
  }
  
  .annual-report-cover {
    width: 100%;
    max-width: 280px;
    height: auto;
  }
  
  /* Make buttons smaller on tablet */
  .annual-report-content .btn,
  .annual-report-content button,
  .annual-report-content a.btn {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    min-height: auto;
    line-height: 1.2;
  }
}

/* Mobile specific adjustments */
@media (max-width: 576px) {
  .ilas-impact-wrapper {
    padding: 0.25rem;
  }
  
  .annual-report-content {
    max-width: 320px;
    width: 320px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  
  .annual-report-cover {
    width: 100%;
    max-width: 240px;
  }
  
  .annual-report-cell {
    margin-top: 1rem;
  }
  
  /* Make buttons smaller on mobile */
  .annual-report-content .btn,
  .annual-report-content button,
  .annual-report-content a.btn {
    font-size: 0.6rem;
    padding: 0.2rem 0.4rem;
    min-height: auto;
    line-height: 1.1;
  }
}