/*--------------------------------------------------------------
# Single Tool Page Styles
--------------------------------------------------------------*/

/* Tool Container */

.afel-tool-container {
  max-width: 100%;
  margin: 0 auto;
}

/* Tool Detail Section */
.afel-tool-detail {
  background-color: var(--afel-body-bg);
  border-radius: 6px;
  /* overflow: hidden; */
  margin-bottom: 8px;
}

/* Tool Detail Top - Responsive Grid */
.afel-tool-detail-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

@media (max-width: 1024px) {
  .afel-tool-detail-top {
    grid-template-columns: 1fr;
  }
}

/* Tool Info Section */
.afel-tool-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.afel-tool-info p {
  margin: 0;
}

/* Tool Logo Styles */
.afel-tool-logo {
  width: 68px;
  height: 68px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--afel-border-color);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.afel-tool-category-list {
  display: flex;
  row-gap: 6px;
  column-gap: 4px;
  flex-wrap: wrap;
}

.afel-tool-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transition: transform var(--afel-transition-normal) ease;
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .afel-tool-logo {
    width: 64px;
    height: 64px;
  }
}

/* Tool Header */
.afel-tool-name-container,
.afel-tool-name-and-label,
.afel-tool-name.afel-single-title {
  overflow: visible;
}

.afel-tool-name-group {
  display: flex;
  gap: 16px;
}

.afel-tool-name-and-label {
  position: relative;
}

.afel-tool-name.afel-single-title {
  margin: 2px 0 2px 0;
}

.afel-tool-name.afel-single-title h1 {
  line-height: 1;
  display: inline;
  font-weight: 700;
  width: fit-content;
  max-width: fit-content;
}

.afel-tool-name.afel-single-title a {
  font-size: var(--afel-h1-size);
  font-weight: 700;
  color: var(--afel-primary-text-color);
  margin: 0;
  line-height: 1.2;
  color: inherit;
  text-decoration: none;
  transition: color var(--afel-transition-normal) ease;
}

.afel-tool-name a:hover {
  color: var(--afel-brand-color);
  text-decoration: none;
}

.afel-tool-detail-top svg.afel-verified-label {
  flex: 1;
  width: 16px;
  height: 16px;
  margin-top: -40px;
}

/* Price Type Badge styles in the tool-card.css */
.afel-tool-price-type {
  margin: 0;
}

/* Short Description */
.afel-tool-short-description {
  font-size: 0.875rem;
  color: var(--afel-secondary-text-color);
  margin: 0;
}

/* Rating Section */
.afel-tool-pricing {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.afel-tool-pricing p {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.afel-tool-label {
  font-weight: 500;
  color: var(--afel-primary-text-color);
}

/* Star Rating */
.star-rating {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  position: relative;
  cursor: help;
}

.afel-star {
  font-size: 1.25rem;
  line-height: 1;
  transition: color var(--afel-transition-normal) ease;
}

.afel-star.afel-filled {
  color: #fbbf24;
}

.afel-star.afel-empty {
  color: var(--afel-border-color);
}

.afel-star.afel-partial {
  background: linear-gradient(
    90deg,
    #fbbf24 var(--fill-percentage),
    var(--afel-border-color) var(--fill-percentage)
  );
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #fbbf24;
}

/* Tooltip for rating */
.star-rating::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--afel-dark-bg);
  color: white;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all var(--afel-transition-normal) ease;
  z-index: var(--afel-z-index-tooltip);
  pointer-events: none;
}

.star-rating:hover::after {
  opacity: 1;
  visibility: visible;
  bottom: calc(100% + 5px);
}

/* Tool Actions */
.afel-tool-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.afel-tool-detail-top .afel-tool-actions .afel-favorite-tool-btn {
  margin-top: 2px;
  border: 1px solid var(--afel-border-color);
  padding: 12px;
}

.afel-tool-detail-top .afel-tool-actions .afel-favorite-tool-btn svg {
  width: 22px;
  height: 22px;
}

.afel-tool-website-button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 10px 24px;
  font-weight: 500;
  transition: all var(--afel-transition-normal) ease;
  border-radius: 4px;
  border: none;
}

.afel-tool-website-button:hover {
  background-color: var(--afel-secondary-color);
  color: #fff;
  text-decoration: none;
}

.afel-tool-website-button svg {
  width: 14px;
  height: 14px;
  transition: transform var(--afel-transition-normal) ease;
}

.afel-tool-website-button:hover svg {
  transform: translateX(4px);
}

/*--------------------------------------------------------------
# Favorite Button Styles
--------------------------------------------------------------*/
.afel-tool-actions .afel-favorite-btn {
  padding: 12px;
  background: var(--afel-body-bg);
  margin: 0;
  border: solid 1px var(--afel-border-color);
  border-radius: 6px;
  color: var(--afel-secondary-text-color);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--afel-transition-normal) ease;
  text-decoration: none;
  height: 100%;
}

.afel-favorite-btn:hover {
  border-color: var(--afel-brand-color);
  color: var(--afel-brand-color);
  background: var(--afel-brand-color-bg);
  text-decoration: none;
}

/* Featured Image */
.afel-tool-featured-image {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: var(--afel-shadow-md);
  aspect-ratio: 3 / 2;
}

.afel-tool-featured-image img {
aspect-ratio: 3 / 2;
  object-fit: cover;
  transition: transform var(--afel-transition-normal) ease;
}

/* Tool Detail Bottom */

.afel-tool-detail-bottom .afel-single-content {
  max-width: none;
  padding-bottom: 10px;
  margin-bottom: 24px;
  position: relative;
}

.afel-tool-detail-bottom .afel-single-content::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  background-color: var(--afel-border-color);
  height: 1px;
  width: 120px;
}

/* Tool Alternatives Section */

.afel-tool-alternatives-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.afel-tool-alternatives-header h2 {
  margin: 0;
  font-size: var(--afel-h2-size);
}

.afel-tool-alternatives-header h2 a {
  color: var(--afel-primary-text-color);
  text-decoration: none;
  transition: color var(--afel-transition-normal) ease;
}

.afel-tool-alternatives-header h2 a:hover {
  color: var(--afel-brand-color);
}

.afel-tool-alternatives-header > a {
  color: var(--afel-brand-color);
  font-weight: 500;
  text-decoration: none;
  transition: color var(--afel-transition-normal) ease;
}

.afel-tool-alternatives-header > a:hover {
  color: var(--afel-secondary-color);
  text-decoration: underline;
}

/* Responsive Adjustments */
@media (max-width: 767px) {
  .afel-tool-name {
    font-size: var(--afel-h2-size);
  }

  .afel-tool-short-description {
    font-size: 1rem;
  }
}

/* Focus states for accessibility */
.afel-tool-website-button:focus,
.afel-content-cta-btn:focus {
  outline: 2px solid var(--afel-brand-color);
  outline-offset: 2px;
}

.afel-tool-category-badge:focus {
  outline: 2px solid var(--afel-brand-color);
  outline-offset: 1px;
}
