/* PCT Frontend Styles */

/* Product Count */
.pct-product-count {
    margin-bottom: 1em;
    font-size: 0.9em;
    color: #555;
}

/* Table Wrapper */
.pct-comparison-table-wrapper {
    margin-bottom: 1.5em;
}

/* Individual Product Card - NO DEFAULT STYLES */
.pct-product-card {
    clear: both;
}
.pct-product-card img {
    max-width: 100%;
    height: auto;
    display: block;
}
.pct-product-card .pct-brand-logo {
     margin-bottom: 10px;
}


/* --- Modal Styles --- */
body.pct-modal-open {
    overflow: hidden;
}

.pct-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99998;
    cursor: pointer;
}

.pct-modal-container {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #fff;
    padding: 25px;
    padding-top: 45px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.2);
    z-index: 99999;
    overflow-y: auto;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    box-sizing: border-box;
}

.pct-modal-close {
    position: absolute;
    top: 0;
    right: 0;
    width: 50px;
    height: 50px;
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    padding: 15px;
    text-align: right;
}
.pct-modal-close:hover,
.pct-modal-close:focus {
    color: #333;
    outline: none;
    background: none;
}

.pct-modal-content-area img {
    max-width: 100%;
    height: auto;
    display: block;
}
.pct-modal-content-area p:last-child {
     margin-bottom: 0;
}

.pct-modal-hidden-content {
    display: none !important;
    visibility: hidden;
}

.pct-tooltip {
    position: relative;
    cursor: help;
    display: inline-block;
  }
  
  .pct-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    background-color: #333;
    color: #fff;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.9em;
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;
    pointer-events: none;
  }
  
  .pct-tooltip::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
    z-index: 11;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;
    pointer-events: none;
  }
  
  /* --- MODIFICATION START --- */
  /* Rule for devices that CAN hover (desktops) */
  @media (hover: hover) {
      .pct-tooltip:hover::before,
      .pct-tooltip:hover::after {
          opacity: 1;
          visibility: visible;
      }
  }
  
  /* Rule for the active class on ANY device (this is toggled by JS for touch) */
  .pct-tooltip.tooltip-active::before,
  .pct-tooltip.tooltip-active::after {
      opacity: 1;
      visibility: visible;
  }
  
  /* Icon styling */
  .pct-tooltip-icon {
      display: inline-block;
      vertical-align: middle;
      width: 1em;
      height: 1em;
      margin-left: 0.25em;
      fill: #555; /* Default icon color */
      transition: fill 0.2s ease-in-out;
  }

  /* Active state for the icon color */
  .pct-tooltip.tooltip-active .pct-tooltip-icon {
      fill: #0073aa; /* WordPress Blue, or your preferred highlight color */
  }
  /* --- MODIFICATION END --- */

.pct-is-clickable-card {
    cursor: pointer;
}

.pct-custom-toggle-button {
    cursor: pointer;
}

.pct-custom-toggle-button .pct-toggle-indicator {
    margin-left: 5px;
    font-weight: bold;
}
   
.has-brand-background-color {
    background-color: var(--brand-primary-color) !important;
}
.has-brand-text-color {
    color: var(--brand-primary-color) !important;
}
.has-brand-border-color {
    border: 2px solid var(--brand-primary-color) !important;
    padding: 10px;
}

.pct-modal-footer-close {
    text-align: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.pct-modal-footer-close a {
    text-decoration: underline;
    color: #555;
}

.pct-modal-footer-close a:hover {
    color: #000;
}

.pct-generated-form {
    border: 1px solid #e0e0e0;
    padding: 20px;
    border-radius: 4px;
    background: #f9f9f9;
    max-width: 600px;
    margin: 20px auto;
}

.pct-form-field-wrap {
    margin-bottom: 15px;
}

.pct-form-field-wrap label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
}

.pct-generated-form input[type="text"],
.pct-generated-form select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
    box-sizing: border-box;
}

.pct-radio-group .pct-radio-item {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.pct-radio-group .pct-radio-item input[type="radio"] {
    margin-right: 10px;
}

.pct-generated-form button[type="submit"] {
    display: inline-block;
    background-color: #0073aa;
    color: #fff;
    border: none;
    padding: 10px 20px;
    text-align: center;
    text-decoration: none;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
}

.pct-generated-form button[type="submit"]:hover {
    background-color: #005a87;
}


.pct-brand-carousel {
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.pct-brand-carousel.slick-initialized {
    visibility: visible;
    opacity: 1;
}

.pct-brand-carousel .slick-slide {
    display: flex;
}

.pct-brand-carousel .slick-track {
    display: flex;
}

.pct-brand-carousel .pct-carousel-item {
    padding: 10px;
    justify-items: center;
}