/**
 * Flower Visualization Styles
 * For Petals of Life application
 */

/* ============================================
   SVG FLOWER ANIMATIONS
   ============================================ */

.flower-svg {
  width: 100%;
  height: 100%;
  max-width: 550px;
  max-height: 550px;
}

.petal-shape {
  transition: filter 0.3s ease;
  cursor: pointer;
}

.petal-shape:hover {
  filter: brightness(1.1) drop-shadow(0 6px 12px rgba(0,0,0,0.2));
}

.petal-content {
  pointer-events: none;
}

@keyframes gentlePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.006); }
}

@keyframes twinkle {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 1; }
}

.sparkle {
  animation: twinkle 2.5s ease-in-out infinite;
}

.flower-main {
  animation: gentlePulse 8s ease-in-out infinite;
  transform-origin: center;
}

/* ============================================
   FLOWER CONTAINER
   ============================================ */

.flower-container {
  position: relative;
  width: 100%;
  max-width: 550px;
  aspect-ratio: 1;
  margin: 0 auto;
}

.flower-container-sm {
  max-width: 300px;
}

.flower-container-lg {
  max-width: 700px;
}

/* ============================================
   PETAL COUNT SELECTOR
   ============================================ */

.petal-count-selector {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.petal-count-btn {
  width: 44px;
  height: 44px;
  border: 2px solid #E5E7EB;
  border-radius: 8px;
  background: white;
  font-size: 16px;
  font-weight: 600;
  color: #6B7280;
  cursor: pointer;
  transition: all 0.2s;
}

.petal-count-btn:hover {
  border-color: #1DA7A0;
  color: #1DA7A0;
}

.petal-count-btn.active {
  background: #1DA7A0;
  border-color: #1DA7A0;
  color: white;
}

/* ============================================
   COLOR PICKER
   ============================================ */

.color-picker {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.color-swatch {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 3px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.color-swatch:hover {
  transform: scale(1.15);
}

.color-swatch.active {
  border-color: #123C6B;
  box-shadow: 0 0 0 2px white, 0 0 0 4px #123C6B;
}

.color-swatch::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: white;
  opacity: 0;
  transition: opacity 0.2s;
}

.color-swatch.active::after {
  opacity: 1;
}

/* Color swatch backgrounds */
.color-swatch[data-color="coral"] { background: linear-gradient(135deg, #D97B6E, #F4A69A); }
.color-swatch[data-color="gold"] { background: linear-gradient(135deg, #C9A030, #E8C547); }
.color-swatch[data-color="peach"] { background: linear-gradient(135deg, #E08B7F, #F5ADA3); }
.color-swatch[data-color="green"] { background: linear-gradient(135deg, #4A8E48, #6CB568); }
.color-swatch[data-color="mint"] { background: linear-gradient(135deg, #4EB3A5, #7DCDC2); }
.color-swatch[data-color="teal"] { background: linear-gradient(135deg, #2D8B84, #4ABAB3); }
.color-swatch[data-color="purple"] { background: linear-gradient(135deg, #8B6CAF, #A88BC7); }
.color-swatch[data-color="blue"] { background: linear-gradient(135deg, #4A7FB5, #6B9FD3); }

/* ============================================
   ICON PICKER
   ============================================ */

.icon-picker-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 2px dashed #E5E7EB;
  border-radius: 12px;
  background: #F9FAFB;
  cursor: pointer;
  transition: all 0.2s;
}

.icon-picker-trigger:hover {
  border-color: #1DA7A0;
  background: #F0FAFA;
}

.icon-picker-trigger.has-icon {
  border-style: solid;
  border-color: #1DA7A0;
  background: white;
}

.icon-picker-trigger svg {
  color: #6B7280;
}

.icon-picker-trigger.has-icon svg {
  color: #1DA7A0;
}

/* Icon Grid */
.icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
  gap: 8px;
  max-height: 300px;
  overflow-y: auto;
  padding: 8px;
}

.icon-grid-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 4px;
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  background: #F9FAFB;
}

.icon-grid-item:hover {
  background: #F0FAFA;
  border-color: #1DA7A0;
}

.icon-grid-item.active {
  background: #1DA7A0;
  border-color: #1DA7A0;
  color: white;
}

.icon-grid-item svg {
  width: 24px;
  height: 24px;
  margin-bottom: 4px;
}

.icon-grid-item .icon-name {
  font-size: 10px;
  text-align: center;
  line-height: 1.2;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Category tabs */
.icon-category-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.icon-category-tab {
  padding: 6px 12px;
  border: 1px solid #E5E7EB;
  border-radius: 20px;
  background: white;
  font-size: 12px;
  color: #6B7280;
  cursor: pointer;
  transition: all 0.2s;
}

.icon-category-tab:hover {
  border-color: #1DA7A0;
  color: #1DA7A0;
}

.icon-category-tab.active {
  background: #1DA7A0;
  border-color: #1DA7A0;
  color: white;
}

/* Search */
.icon-search {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid #E5E7EB;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 12px;
  transition: border-color 0.2s;
}

.icon-search:focus {
  outline: none;
  border-color: #1DA7A0;
}

/* ============================================
   PETAL EDITOR CARD
   ============================================ */

.petal-editor-card {
  background: white;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  border-left: 4px solid #E5E7EB;
  transition: border-color 0.2s;
}

.petal-editor-card:hover {
  border-left-color: #1DA7A0;
}

.petal-editor-card.active {
  border-left-color: #1DA7A0;
  box-shadow: 0 4px 12px rgba(29, 167, 160, 0.15);
}

.petal-editor-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.petal-number {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #F3F4F6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  color: #6B7280;
}

.petal-editor-card.active .petal-number {
  background: #1DA7A0;
  color: white;
}

.petal-word-input {
  flex: 1;
  padding: 8px 12px;
  border: 2px solid #E5E7EB;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  transition: border-color 0.2s;
}

.petal-word-input:focus {
  outline: none;
  border-color: #1DA7A0;
}

.petal-word-input::placeholder {
  text-transform: none;
  font-weight: 400;
}

/* ============================================
   FLOWER CARD (for garden grid)
   ============================================ */

.flower-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(18, 60, 107, 0.08);
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
  display: block;
}

.flower-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(18, 60, 107, 0.15);
}

.flower-card-preview {
  background: linear-gradient(135deg, #FFF8F0 0%, #E8F4F3 50%, #D4EDE9 100%);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
}

.flower-card-body {
  padding: 16px;
}

.flower-card-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: #123C6B;
  margin: 0 0 4px;
}

.flower-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: #6B7280;
}

.flower-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: #F3F4F6;
  border-radius: 12px;
  font-size: 12px;
}

/* ============================================
   NEW FLOWER CARD
   ============================================ */

.flower-card-new {
  border: 2px dashed #E5E7EB;
  background: #FAFAFA;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  transition: all 0.3s ease;
}

.flower-card-new:hover {
  border-color: #1DA7A0;
  background: #F0FAFA;
  transform: translateY(-4px);
}

.flower-card-new-content {
  text-align: center;
  padding: 24px;
}

.flower-card-new-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1DA7A0, #4EB3A5);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.flower-card-new-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #123C6B;
  margin: 0;
}

/* ============================================
   GARDEN GRID
   ============================================ */

.garden-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

@media (max-width: 576px) {
  .garden-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* ============================================
   EDITOR LAYOUT
   ============================================ */

.editor-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

@media (max-width: 992px) {
  .editor-layout {
    grid-template-columns: 1fr;
  }
}

.editor-preview {
  position: sticky;
  top: 24px;
}

.editor-form {
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  padding-right: 8px;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.text-navy {
  color: #123C6B;
}

.bg-garden {
  background: linear-gradient(135deg, #FFF8F0 0%, #E8F4F3 50%, #D4EDE9 100%);
}

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