/* Landing Page Custom Styles */

/* Default text color - override all gray text colors */
body {
  color: rgb(173 122 135) !important;
}

/* Override all Tailwind gray text colors */
.text-gray-50,
.text-gray-100,
.text-gray-200,
.text-gray-300,
.text-gray-400,
.text-gray-500,
.text-gray-600,
.text-gray-700,
.text-gray-800,
.text-gray-900 {
  color: rgb(173 122 135) !important;
}

/* Override pink-500 icons to button color */
.text-pink-500 {
  color: rgb(255 183 202) !important;
}

/* Override specific elements */
h1, h2, h3, h4, h5, h6, p, span, div, a, button, label {
  color: inherit;
}

/* Ensure white text stays white */
.text-white {
  color: white !important;
}

/* Smooth Scroll */
html {
  scroll-behavior: smooth;
}

/* Hide Scrollbar */
.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
  scroll-behavior: smooth;
}

.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

/* Simple Logo with Gradient */
.logo-simple {
  font-family: 'Pacifico', cursive;
  background: linear-gradient(135deg, #ec4899 0%, #f472b6 50%, #fbbf24 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 4px rgba(236, 72, 153, 0.2));
}

/* Carousel Navigation Buttons */
.carousel-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 3rem;
  height: 3rem;
  background-color: rgba(255, 255, 255, 0.95);
  color: #453535;
  border: 2px solid rgba(251, 207, 232, 0.5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(4px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.carousel-nav-btn:hover {
  background-color: #fbcfe8;
  color: #453535;
  border-color: #fbcfe8;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 10px 20px rgba(251, 207, 232, 0.4);
}

.carousel-nav-btn:active {
  transform: translateY(-50%) scale(0.95);
}

.carousel-nav-btn i {
  font-size: 1.25rem;
}

.carousel-prev-btn {
  left: 1rem;
}

.carousel-next-btn {
  right: 1rem;
}

@media (max-width: 640px) {
  .carousel-nav-btn {
    width: 2.5rem;
    height: 2.5rem;
  }
  
  .carousel-nav-btn i {
    font-size: 1rem;
  }
}

/* Carousel Cards */
.template-card-carousel {
  flex: 0 0 auto;
  width: 280px;
  background-color: white;
  border-radius: 0.75rem;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(251, 207, 232, 0.3);
}

@media (min-width: 768px) {
  .template-card-carousel {
    width: 320px;
  }
}

.template-card-carousel:hover {
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
  border-color: #fbcfe8;
}

.template-thumbnail-carousel {
  position: relative;
  aspect-ratio: 3/4;
  overflow: hidden;
}

.template-thumbnail-carousel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: none;
}

.template-overlay-carousel {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.template-thumbnail-carousel:hover .template-overlay-carousel {
  opacity: 1;
}

.btn-preview-carousel {
  padding: 0.75rem 1.5rem;
  background-color: white;
  color: rgb(173 122 135);
  border-radius: 9999px;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  border: none;
  cursor: pointer;
}

.btn-preview-carousel:hover {
  background-color: #fbcfe8;
  color: rgb(255 183 202);
}

.template-info-carousel {
  padding: 1rem;
}

.btn-choose-carousel {
  width: 100%;
  padding: 0.5rem 1rem;
  background-color: rgb(255 183 202);
  color: white;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.875rem;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.btn-choose-carousel:hover {
  background-color: rgb(255 200 215);
  box-shadow: 0 4px 8px rgba(255, 183, 202, 0.4);
}

@media (max-width: 768px) {
  .template-card-carousel {
    width: 260px;
  }
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal.flex {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  background-color: white;
  border-radius: 1.5rem;
  max-width: 72rem;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  z-index: 10;
  display: flex;
  flex-direction: column;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 20;
  width: 2.5rem;
  height: 2.5rem;
  background-color: white;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
}

.modal-close:hover {
  background-color: #f3f4f6;
}

.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid #e5e7eb;
}

.modal-body {
  flex: 1;
  overflow: hidden;
}

.preview-iframe {
  width: 100%;
  height: 100%;
  border: 0;
  min-height: 600px;
}

.modal-footer {
  padding: 1.5rem;
  border-top: 1px solid #e5e7eb;
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

.btn-secondary {
  padding: 0.75rem 1.5rem;
  background-color: #f3f4f6;
  color: rgb(173 122 135);
  border-radius: 0.5rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background-color: #e5e7eb;
}

.btn-primary {
  padding: 0.75rem 1.5rem;
  background-color: rgb(255 183 202);
  color: white;
  border-radius: 0.5rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background-color: rgb(255 200 215);
}

.template-features-wrapper {
  position: relative;
  margin: 1rem 0;
}

/* Gradient overlays fixed on wrapper, not inside scroll */
.template-features-wrapper::before,
.template-features-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0.5rem;
  width: 40px;
  pointer-events: none;
  z-index: 2;
}

.template-features-wrapper::before {
  left: -1px;
  background: linear-gradient(to right, rgba(255, 255, 255, 0.9), transparent);
  transition: opacity 0.2s ease;
}

.template-features-wrapper::after {
  right: 0;
  background: linear-gradient(to left, rgba(255, 255, 255, 0.9), transparent);
  transition: opacity 0.2s ease;
}

.template-features-wrapper.hide-fade-left::before {
  opacity: 0;
  pointer-events: none;
}

.template-features-wrapper.hide-fade-right::after {
  opacity: 0;
  pointer-events: none;
}

.template-features {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  margin: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
  transition: scrollbar-color 0.3s ease;
}

/* Show scrollbar only when scrolling */
.template-features:hover,
.template-features:active {
  scrollbar-color: rgba(209, 213, 219, 0.5) transparent;
}

/* Custom scrollbar for Webkit browsers (Chrome, Safari, Edge) */
.template-features::-webkit-scrollbar {
  height: 6px;
}

.template-features::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 16px;
}

.template-features::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 16px;
  transition: background 0.3s ease;
}

/* Show scrollbar thumb on hover/scroll */
.template-features:hover::-webkit-scrollbar-thumb,
.template-features:active::-webkit-scrollbar-thumb {
  background: rgba(209, 213, 219, 0.5);
}

.template-features::-webkit-scrollbar-thumb:hover {
  background: rgba(209, 213, 219, 0.7);
}

.feature-tag {
  padding: 0.25rem 0.75rem;
  background-color: #fce7f3;
  color: rgb(255 183 202);
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
  position: relative;
  z-index: 0;
}

/* Animations */
.animate-in {
  animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
  0% {
    transform: translateY(30px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

.highlight-pulse {
  animation: pulse 2s ease-in-out;
}

@keyframes pulse {
  0%, 100% {
    background-color: transparent;
  }
  50% {
    background-color: rgba(252, 231, 243, 0.5);
  }
}

/* Loading Spinner */
.loading-spinner {
  border: 3px solid #f3f4f6;
  border-top: 3px solid rgb(255 183 202);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 2rem auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.iframe-error {
  text-align: center;
  padding: 3rem;
  color: rgb(173 122 135);
}

.iframe-error i {
  font-size: 3rem;
  color: rgb(255 183 202);
  margin-bottom: 1rem;
}
