/*
Theme Name:     Colour Me Happy Child
Theme URI:      n/a
Template:       kadence
Author:         Emma
Author URI:     n/a
Description:    Child Theme Description
Version:        1.0
License:        GNU General Public License v3.0 (or later)
License URI:    https://www.gnu.org/licenses/gpl-3.0.html
*/
/* --------------------------------------------------------------
   GLOBAL LAYOUT & TYPOGRAPHY
-------------------------------------------------------------- */

.site-top-footer-inner-wrap .widget-area {
  text-align: center;
}

li.additional_information_tab {
  display: none !important;
}

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
  text-align: center;
}

.site-footer {
  border-top: 5px double #3F4666;
}

.woocommerce-tabs ul.tabs li a {
  font-family: 'cinzel decorative';
  font-size: 18px !important;
  font-weight: 500 !important;
  color: #3F4664 !important;
}

/* --------------------------------------------------------------
   PRODUCT PAGE TWEAKS
-------------------------------------------------------------- */

.single-product .product .summary {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.single-product .product_title {
  margin-top: 0 !important;
  margin-bottom: 0.3em !important;
}

.single-product .price {
  margin-bottom: 0.5em !important;
}

.single-product .woocommerce-product-details__short-description {
  margin-top: 0.5em !important;
  margin-bottom: 0.5em !important;
  line-height: 1.4;
}

.woocommerce div.product form.cart .variations label {
  font-weight: 500;
}

/* Force name input field to match dropdown width */
.wapf-field-input .wapf-input {
  width: 50% !important;
  max-width: 50% !important;
  box-sizing: border-box;
  padding: 0.6em;
  font-size: 16px;
  border: 1px solid #3F4666;
}

/* --------------------------------------------------------------
   COLOUR PLAYGROUND LAYOUT
-------------------------------------------------------------- */

#colour-playground {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
  padding: 0 1rem;
}

#colour-playground h2 {
  font-size: 1.4rem;
  font-weight: 600;
  color: #3F4664;
  margin: 2rem 0 1rem;
}
/* Mobile layout fix for colour playground */
@media (max-width: 480px) {

  /* Make the preview layout stack vertically */
  .preview-layout {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
  }

  /* Ensure the preview SVG scales nicely */
  #mini-preview svg {
    width: 100% !important;
    height: auto !important;
  }

  /* Make the name input full width on mobile */
  #name-input {
    width: 100% !important;
    max-width: 320px;
  }

  /* Space out the chosen stars */
  .chosen-grid {
    gap: 0.8rem;
    flex-wrap: wrap;
  }

  /* Make the stars slightly smaller if needed */
  .swatch-star,
  .chosen-star {
    width: 50px;
    height: 50px;
  }
}
/* Mobile: stack YOUR NAME label above the input */
@media (max-width: 480px) {
  .name-row {
    flex-direction: column;
    align-items: flex-start; /* keeps label nicely aligned */
    gap: 0.3rem;
  }

  #name-input {
    width: 100% !important;
    max-width: 320px;
  }
}

/* --------------------------------------------------------------
   SWATCH GRID
-------------------------------------------------------------- */

.swatch-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.2rem;
  margin: 1.5rem 0;
}

.swatch-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 80px;
}

.swatch-label {
  margin-top: 0.4rem;
  font-size: 0.9rem;
  color: #3F4664;
  font-weight: 500;
  text-align: center;
}

/* Star shape */
.swatch-star,
.chosen-star {
  width: 60px;
  height: 60px;
  clip-path: polygon(
    50% 0%,
    61% 35%,
    98% 35%,
    68% 57%,
    79% 91%,
    50% 70%,
    21% 91%,
    32% 57%,
    2% 35%,
    39% 35%
  );
  background: #eee;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.swatch-star:hover {
  transform: scale(1.1);
}

/* Pop animation */
@keyframes pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.swatch-star.pop {
  animation: pop 0.2s ease-out;
}

/* --------------------------------------------------------------
   CHOSEN PALETTE
-------------------------------------------------------------- */

.chosen-grid {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  margin: 1.5rem auto;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.chosen-star {
  flex: 0 0 auto;
}

/* Fade-out animation */
@keyframes fadeOut {
  0% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(0.8); }
}

.chosen-star.fade-out {
  animation: fadeOut 0.2s ease-out forwards;
}

/* --------------------------------------------------------------
   BUTTONS
-------------------------------------------------------------- */

#clear-palette,
#surprise-me,
#copy-palette {
  margin-top: 2rem;
  padding: 0.6rem 1.2rem;
  background: #3F4664;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  display: inline-block;
}

#clear-palette:hover,
#surprise-me:hover,
#copy-palette:hover {
  background: #2c3147;
  animation: wiggle 0.3s ease-in-out;
}

/* Wiggle animation */
@keyframes wiggle {
  0% { transform: rotate(0deg); }
  25% { transform: rotate(3deg); }
  50% { transform: rotate(-3deg); }
  75% { transform: rotate(3deg); }
  100% { transform: rotate(0deg); }
}

