/* cards.css - Card and Option Component Styles */

/* Options Grid */
#smartfence-embed-root .options-grid { 
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); /* Increased min-width */
  gap: 1rem; /* Increased gap to match estimator */
  margin-bottom: 1rem;
}

#smartfence-embed-root .option-card { 
  background-color: var(--bg-primary);
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 1rem;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  box-shadow: var(--shadow-sm); /* Added shadow */
  display: flex;
  flex-direction: column;
  justify-content: center; /* Center content vertically when no image */
  min-height: 120px; /* Minimum height for consistency */
}

#smartfence-embed-root .option-card:hover { 
  border-color: var(--primary-color);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

#smartfence-embed-root .option-card.selected { 
  border-color: var(--primary-color);
  background-color: rgba(37, 99, 235, 0.05);
}

#smartfence-embed-root .option-header { 
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 0.5rem;
}

#smartfence-embed-root .option-label { 
  font-weight: 600;
  color: var(--text-primary);
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

#smartfence-embed-root .option-description { 
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.4;
  text-align: center;
}

/* Option Card with Image Styles - Override centering for image cards */
#smartfence-embed-root .option-card.with-image { 
  background-color: var(--bg-primary);
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 0;
  cursor: pointer;
  transition: var(--transition);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-start; /* Reset to top alignment for image cards */
  min-height: 240px;
}

#smartfence-embed-root .option-card.with-image:hover { 
  border-color: var(--primary-color);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

#smartfence-embed-root .option-card.with-image.selected { 
  border-color: var(--primary-color);
  background-color: rgba(37, 99, 235, 0.05);
}

#smartfence-embed-root .option-card.with-image .fence-type-image { 
  width: 100%;
  height: 140px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

#smartfence-embed-root .option-card.with-image:hover .fence-type-image { 
  transform: scale(1.05);
}

#smartfence-embed-root .option-card.with-image .option-content { 
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

#smartfence-embed-root .option-card.with-image .option-header { 
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 0.25rem;
}

#smartfence-embed-root .option-card.with-image .option-label { 
  font-weight: 600;
  color: var(--text-primary);
  font-size: 1rem;
  margin-bottom: 0.125rem;
}

#smartfence-embed-root .option-card.with-image .option-description { 
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.4;
  text-align: center;
}

#smartfence-embed-root .option-card.with-image .option-price { 
  font-size: 0.875rem;
  color: var(--primary-color);
  font-weight: 600;
  text-align: center;
  margin-top: 0.5rem;
}

/* Remove any conflicting styles that might cause side-by-side layout */
#smartfence-embed-root .option-card.with-image .option-image { 
  display: none !important; /* Hide old image class if it exists */
}

/* Service Card */
#smartfence-embed-root .service-card { 
  background-color: var(--bg-tertiary);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  text-align: center;
  transition: var(--transition);
  border: 1px solid var(--border-color);
}

#smartfence-embed-root .service-card:hover { 
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-color);
}

#smartfence-embed-root .service-card i { 
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

#smartfence-embed-root .service-card h4 { 
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

#smartfence-embed-root .service-card p { 
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Style Cards */
#smartfence-embed-root .style-card { 
  background-color: var(--bg-tertiary);
  border-radius: var(--border-radius-sm);
  padding: 1.25rem; /* Increased padding */
  text-align: center;
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

#smartfence-embed-root .style-card:hover { 
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-color);
}

#smartfence-embed-root .style-card h5 { 
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

#smartfence-embed-root .style-card p { 
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

#smartfence-embed-root .price-range { 
  font-size: 0.875rem;
  color: var(--primary-color);
  font-weight: 600;
}

/* Contact Method Card */
#smartfence-embed-root .contact-method { 
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background-color: var(--bg-tertiary);
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-color);
}

#smartfence-embed-root .contact-method i { 
  color: var(--primary-color);
  font-size: 1.25rem;
}