/* Tailwind configuration */
/* This file should be loaded BEFORE Tailwind CDN in index.html */

body {
  font-family: 'Montserrat', sans-serif;
  background: #FAFAF7;
  color: #2D2A26;
}

.font-serif {
  font-family: 'Cormorant Garamond', serif;
}

.font-script {
  font-family: 'Great Vibes', cursive;
}

/* Color input styling */
input[type="color"] {
  -webkit-appearance: none;
  appearance: none;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 50%;
}

/* Preset swatches */
.preset-swatch {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.25s ease;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.preset-swatch:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.preset-swatch.active {
  box-shadow: 0 0 0 2px #FAFAF7, 0 0 0 4px #2D2A26;
}

/* Preview frame background pattern */
.preview-frame {
  background-image:
    linear-gradient(45deg, #f0ebe4 25%, transparent 25%),
    linear-gradient(-45deg, #f0ebe4 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #f0ebe4 75%),
    linear-gradient(-45deg, transparent 75%, #f0ebe4 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-color: #faf6f0;
}

/* Textarea styling */
textarea {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 12px;
}

/* Animations */
.fade-in {
  animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Layout preview cards */
.layout-card {
  position: relative;
  border: 1.5px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  padding: 14px 10px 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #fff;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.layout-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

.layout-card.active {
  border-color: #2D2A26;
  box-shadow: 0 0 0 1px #2D2A26;
}

.layout-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 6px;
  background: #fff;
  border-top: 1px solid #f0ebe4;
  font-size: 9px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  text-align: center;
  color: #8a8580;
}

.layout-card.active .layout-label {
  background: #2D2A26;
  color: #fff;
  border-color: #2D2A26;
}

/* Mini preview layouts */
.mini-classic {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  align-items: center;
  height: 100%;
  padding: 12px 8px 22px;
  text-align: center;
}

.mini-classic .unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.mini-classic .num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 13px;
  line-height: 1;
  color: #2D2A26;
  font-weight: 400;
}

.mini-classic .lbl {
  font-family: 'Montserrat', sans-serif;
  font-size: 4px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #8a8580;
}

.mini-progress {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  height: 100%;
  padding: 16px 12px 22px;
  gap: 6px;
}

.mini-progress .title-line {
  height: 2px;
  width: 40%;
  background: #d4cec4;
  margin: 0 auto;
  border-radius: 1px;
}

.mini-progress .names-line {
  height: 3px;
  width: 55%;
  background: #2D2A26;
  margin: 0 auto;
  border-radius: 1px;
  opacity: 0.6;
}

.mini-progress .bar-wrap {
  position: relative;
  height: 2px;
  width: 100%;
  background: #e8e3dc;
  border-radius: 1px;
  overflow: hidden;
  margin: 4px 0;
}

.mini-progress .bar-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 62%;
  background: #2D2A26;
  border-radius: 1px;
}

.mini-progress .labels {
  display: flex;
  justify-content: space-between;
  font-family: 'Montserrat', sans-serif;
  font-size: 3.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8a8580;
}

.mini-ring {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
  padding: 10px 8px 22px;
  gap: 6px;
}


.mini-ring .mini-ring-dial {
  position: relative;
  width: 36px;
  height: 36px;
  overflow: hidden;
}

.mini-ring .mini-ring-dial svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  display: block;
  overflow: hidden;
}

.mini-ring .mini-ring-dial .track {
  fill: none;
  stroke: #e8e3dc;
  stroke-width: 2;
}

.mini-ring .mini-ring-dial .fill {
  fill: none;
  stroke: #2D2A26;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 88;
  stroke-dashoffset: 28;
}

.mini-ring .center-num {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Montserrat', sans-serif;
  font-size: 10px;
  font-weight: 300;
  color: #2D2A26;
}

.mini-ring .sub-row {
  display: flex;
  gap: 6px;
  align-items: center;
}

.mini-ring .sub-dot {
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: #8a8580;
}

.mini-ring .sub-line {
  width: 10px;
  height: 1.5px;
  background: #d4cec4;
  border-radius: 1px;
}

.mini-minimal {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  height: 100%;
  padding: 14px 8px 22px;
  text-align: center;
}

.mini-minimal .big-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 26px;
  color: #2D2A26;
  line-height: 1;
  font-weight: 300;
}

.mini-minimal .label-up {
  font-family: 'Montserrat', sans-serif;
  font-size: 4.5px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #8a8580;
  margin-top: -2px;
}

.mini-minimal .sub-text {
  font-family: 'Montserrat', sans-serif;
  font-size: 3.5px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #8a8580;
  margin-top: 2px;
  line-height: 1.4;
}

.mini-minimal .italic-line {
  font-family: 'Cormorant Garamond', serif;
  font-size: 7px;
  color: #2D2A26;
  font-style: italic;
  margin-top: 4px;
  opacity: 0.7;
}

/* Product card interactions */
.product-card {
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.3s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(45, 42, 38, 0.08);
}

.product-card:hover .product-img {
  transform: scale(1.04);
}

.product-img {
  transition: transform 0.6s ease;
}

.product-arrow {
  transition: transform 0.3s ease;
}

.product-card:hover .product-arrow {
  transform: translateX(4px);
}

/* Quitar outline azul de focus en los botones de widget style */
.layout-card:focus {
  outline: none;
}

.layout-card:focus-visible {
  outline: 2px solid #2D2A26;
  outline-offset: 2px;
}

/* Neutralizar el ring azul de Tailwind/DaisyUI en los botones de Widget Style */
.layout-card {
  --tw-ring-color: transparent !important;
  --tw-ring-offset-color: transparent !important;
  --tw-ring-shadow: 0 0 #0000 !important;
  --tw-ring-offset-shadow: 0 0 #0000 !important;
  --tw-ring-offset-width: 0px !important;
  --tw-ring-width: 0px !important;
}

.layout-card:focus,
.layout-card:focus-visible,
.layout-card:active,
.layout-card:hover {
  --tw-ring-color: transparent !important;
  --tw-ring-offset-color: transparent !important;
  --tw-ring-shadow: 0 0 #0000 !important;
  --tw-ring-offset-shadow: 0 0 #0000 !important;
  outline: none !important;
  box-shadow: none !important;
}

.layout-card svg,
.layout-card svg:focus {
  outline: none !important;
}

.layout-card.active {
  box-shadow: 0 0 0 1px #2D2A26 !important;
}
