/* Shared styles for AI create pages */

/* Section spacing - prevent truncated look at footer */
.text-to-image-section {
  padding-bottom: 40px;
  margin-bottom: 30px;
}

/* Form container padding across AI pages */
.ai-form-container {
  padding-right: 15px;
}

@media (max-width: 991px) {
  .ai-form-container {
    padding-right: 0;
    margin-bottom: 30px;
  }
}

/* Result container */
.result-container {
  position: relative;
  min-height: 400px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 20px;
  background-color: #f8f9fa;
  width: 100%;
  overflow: hidden;
}

/* Steps block */
.step-card {
  padding: 20px;
  border-radius: 8px;
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  height: 100%;
}

.step-number {
  display: inline-block;
  width: 40px;
  height: 40px;
  line-height: 40px;
  border-radius: 50%;
  background-color: #007bff;
  color: #fff;
  font-weight: bold;
  margin-bottom: 15px;
}

/* Resolution options */
.resolution-option {
  border: 2px solid #dee2e6;
  border-radius: 8px;
  padding: 15px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  height: 100%;
}

.resolution-option:hover {
  box-shadow: 0 5px 15px rgba(142, 74, 240, 0.15);
}

.resolution-option input[type="radio"] {
  display: none;
}

.resolution-option label {
  font-weight: 600;
  font-size: 1.2rem;
  display: block;
  margin-bottom: 5px;
  cursor: pointer;
}

.resolution-option p {
  font-size: 0.85rem;
  color: #666;
  margin: 0;
}

.resolution-dimensions {
  height: auto;
  min-height: 0;
  margin: 0;
}

/* Selected state using :has() - CSS controlled */
.resolution-option:has(input[type="radio"]:checked) {
  border-color: #8e4af0;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.resolution-option:has(input[type="radio"]:checked) label,
.resolution-option:has(input[type="radio"]:checked) p {
  color: #8e4af0;
}

/* Image preview helpers */
.max-height-300 {
  max-height: 300px;
  object-fit: contain;
}

/* Comparison view (split) */
.comparison-container {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.split-view-container {
  width: 100%;
  margin: auto;
  position: relative;
}

.split-view-wrapper {
  position: relative;
  overflow: hidden;
  width: 100%;
  margin: 0 auto;
}

#split-view-image-before {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#split-view-image-after {
  max-width: 100%;
  display: block;
  width: auto;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
}

.split-item-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  clip-path: polygon(50% 0, 100% 0, 100% 100%, 50% 100%);
  z-index: 10;
}

.split-view-slider {
  position: absolute;
  top: 0;
  left: 50%;
  width: 2px;
  height: 100%;
  background: rgba(255, 255, 255, 0.8);
  cursor: ew-resize;
  z-index: 10;
}

.split-view-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 32px;
  height: 32px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
  cursor: ew-resize;
}

.split-view-handle i {
  font-size: 18px;
  color: #666;
}

.split-view-labels {
  position: absolute;
  top: 20px;
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 5;
}

.split-view-labels span {
  background: rgba(0, 0, 0, 0.5);
  padding: 5px 10px;
  border-radius: 4px;
  color: #fff;
  font-weight: bold;
  font-size: 12px;
}

.split-view-wrapper > .split-view-labels .original-label {
  margin-right: auto;
}

.split-item-wrapper.restored .split-view-labels .restored-label {
  margin-left: auto;
}

.demo-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 4rem;
  font-weight: bold;
  color: rgba(255, 255, 255, 0.7);
  text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  z-index: 10;
  letter-spacing: 5px;
  user-select: none;
}

/* AI landing feature slider and feature card effects */
.ai-style-slider {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 100%;
}

.style-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
}

.style-slide.active {
  opacity: 1;
  z-index: 1;
}

.ai-feature-link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ai-feature-link:hover {
  transform: translateY(-5px);
  text-decoration: none;
  color: inherit;
}

.ai-feature-link:hover .feature-image {
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.ai-feature-link:hover h3 {
  color: #8e4af0;
}

/* Flavor profile dots */
.flavor-profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 20px;
}

.flavor-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.flavor-label {
  min-width: 60px;
  font-size: 0.9rem;
  color: #555;
}

.flavor-dots {
  display: flex;
  gap: 6px;
}

.flavor-dots .dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: #ddd;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid #ccc;
}

.flavor-dots .dot:hover {
  transform: scale(1.15);
  opacity: 0.8;
}

/* Edit Image button - floats over result image */
.edit-bar {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  text-align: center;
  z-index: 10;
  pointer-events: none;
}

.edit-bar-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 24px;
  border: none;
  border-radius: 25px;
  background: linear-gradient(135deg, #8e4af0, #6c3ce0);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  letter-spacing: 0.3px;
  pointer-events: auto;
  opacity: 0.9;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.edit-bar-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(142, 74, 240, 0.4);
  opacity: 1;
}

.edit-bar-btn:active {
  transform: scale(0.98);
}

/* Share & Download bar */
.share-bar {
  width: 100%;
  margin-top: 12px;
}

.share-bar-inner {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  color: #fff;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
  text-decoration: none;
}

.share-btn:hover {
  transform: scale(1.12);
  opacity: 0.88;
  color: #fff;
  text-decoration: none;
}

.share-btn-x {
  background-color: #000;
}

.share-btn-facebook {
  background-color: #1877F2;
}

.share-btn-pinterest {
  background-color: #E60023;
}

.share-btn-whatsapp {
  background-color: #25D366;
}

.share-btn-instagram {
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.share-btn-download {
  background-color: #28a745;
}

/* Toast notification */
.share-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(0, 0, 0, 0.82);
  color: #fff;
  padding: 10px 22px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.share-toast-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Responsive: smaller buttons on mobile */
@media (max-width: 575px) {
  .share-btn {
    width: 36px;
    height: 36px;
  }

  .share-btn svg {
    width: 17px;
    height: 17px;
  }

  .share-bar-inner {
    gap: 8px;
  }
}

