/*
Theme Name: Astra Child
Template: astra
Author: Johan Mattsson
Description: Child theme för Klure (Astra-baserat)
Version: 1.0
Text Domain: astra-child
Form Style Sheet
*/

/* ======================================================
   KLURE – GLOBAL FORM GRUNDSTIL
   Gäller för alla formulär (feedback, omdöme, nyhetsbrev)
====================================================== */

.klure-form,
.review-form,
.newsletter-form {
  font-family: inherit;
  font-size: 15px;
  color: #444;
}

/* === Fält (input, select, textarea) === */
.klure-form input,
.klure-form select,
.klure-form textarea {
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 12px;
  font-size: 15px;
  color: #444;
  background-color: #fff;
  margin-bottom: 14px;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.klure-form input:focus,
.klure-form select:focus,
.klure-form textarea:focus {
  border-color: #F39AC0;
  box-shadow: 0 0 0 3px rgba(243,154,192,0.2);
  outline: none;
}

/* === Dropdown === */
.klure-form select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: #fff;
  color: #444;
  height: 48px;
  line-height: 1.4;
  padding-right: 36px;
  background-image: url("data:image/svg+xml;utf8,<svg fill='%239aa0a6' height='16' viewBox='0 0 24 24' width='16' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
}
.klure-form select::-ms-expand { display: none; }

/* === Knappar === */
.submit-btn.elementor-button {
  width: 100%;
  background: #F39AC0;
  color: #fff;
  border-radius: 30px;
  font-weight: 600;
  padding: 12px 20px;
  transition: background-color 0.3s ease;
  cursor: pointer;
}
.submit-btn.elementor-button:hover { background-color: #E885B4; }

.submit-btn.loading {
  opacity: 0.8;
  pointer-events: none;
}

/* === Laddningsindikator === */
.loading-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid #fff;
  border-top: 2px solid transparent;
  border-radius: 50%;
  margin-right: 8px;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
}

/* === Bilduppladdning (feedback) === */
.image-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0 20px;
}
.image-label {
  width: 20%;
  height: 60px;
  border: 1px solid #e5e5e5;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fafafa;
  cursor: pointer;
  transition: all .25s ease;
}
.image-label:hover { background: #f4f4f4; }
.image-label i {
  font-size: 22px;
  color: #9aa0a6;
  transition: color .3s, transform .2s;
}
.image-label:hover i { color: #F39AC0; transform: scale(1.15); }

.image-preview {
  flex: 1;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 10px;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  font-size: 14px;
  color: #666;
}
.image-preview i { color: #999; cursor: pointer; }
.image-preview i:hover { color: #F39AC0; }

.info-text {
  text-align: center;
  color: #777;
  font-size: .85rem;
  margin-top: .8rem;
  line-height: 1.4;
}

/* ======================================================
   KLURE OMDÖMMESFORMULÄR
====================================================== */

.review-form .upload-section {
  margin-top: 1.5rem;
  text-align: center;
}
.review-form .upload-section p {
  font-weight: 600;
  color: #444;
  margin-bottom: .5rem;
}
.review-form .upload-options {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 6px;
  border: 1px solid #e5e5e5;
  border-radius: 14px;
  background: #fafafa;
  overflow: hidden;
}
.review-form .upload-box {
  flex: 1;
  border-right: 1px solid #e5e5e5;
  cursor: pointer;
  transition: all .25s ease;
  padding: 14px 0;
}
.review-form .upload-box:last-child { border-right: none; }
.review-form .upload-box i {
  font-size: 22px;
  color: #9aa0a6;
  transition: color .3s, transform .2s;
}
.review-form .upload-box:hover i {
  color: #F39AC0;
  transform: scale(1.15);
}

.review-form .upload-list {
  margin-top: .7rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.review-form .upload-item {
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 6px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  background: #fff;
}
.review-form .upload-item i { color: #999; cursor: pointer; }
.review-form .upload-item i:hover { color: #F39AC0; }

/* === Stjärn-betyg === */
.review-form .rating-area {
  text-align: center;
  margin-top: 2rem;
  margin-bottom: 3rem;
}
.review-form .rating-stars {
  display: flex;
  flex-direction: row-reverse;
  justify-content: center;
  gap: 6px;
  margin-bottom: .3rem;
  padding-top: 10px;
}
.review-form .rating-stars input { display: none; }
.review-form .rating-stars label {
  font-size: 65px;
  color: #ccc;
  cursor: pointer;
  transition: .2s;
}
.review-form .rating-stars label:hover,
.review-form .rating-stars label:hover ~ label { color: #ffd966; }
.review-form .rating-stars input:checked ~ label { color: #f4b400; }

/* ======================================================
   KLURE NYHETSBREV
====================================================== */

.newsletter-form input,
.newsletter-form select,
.newsletter-form textarea {
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 12px;
  font-size: 15px;
  color: #444;
  background-color: #fff;
  margin-bottom: 14px;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.newsletter-form input:focus {
  border-color: #F39AC0;
  box-shadow: 0 0 0 3px rgba(243,154,192,0.2);
  outline: none;
}

.newsletter-form .submit-btn.elementor-button {
  width: 100%;
  background: #F39AC0;
  color: #fff;
  border-radius: 30px;
  font-weight: 600;
  padding: 12px 20px;
  transition: background-color 0.3s ease;
  cursor: pointer;
}
.newsletter-form .submit-btn.elementor-button:hover {
  background-color: #E885B4;
}

.newsletter-form .submit-btn.loading {
  opacity: 0.8;
  pointer-events: none;
}

.newsletter-form .loading-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid #fff;
  border-top: 2px solid transparent;
  border-radius: 50%;
  margin-right: 8px;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
}

.newsletter-form .info-text {
  text-align: center;
  color: #777;
  font-size: .85rem;
  margin-top: .8rem;
  line-height: 1.4;
}

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




/* ==============================================================
 UPLOAD FORM
===============================================================*/


/* NYTT: Modal Overlay */
.klure-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999; /* Se till att den ligger över Elementor */
    transition: opacity 0.3s ease;
}

.klure-modal-content {
    background: #fff;
    border-radius: 20px;
    padding: 30px;
    max-width: 90%;
    width: 450px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transform: translateY(0);
}

.klure-hidden {
    display: none !important;
}

/* Stil för ikonen i tack-meddelandet */
.klure-modal-content .fa-check-circle {
    font-size: 3rem; 
    margin-bottom: 10px;
}



/*Upload Button*/
.multi-upload-btn {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 30px;
  font-weight: 600;
}

/* Hover som dina andra knappar */
.multi-upload-btn:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0,0,0,0.08);
}

/*Checkbox Size*/
.klure-checkbox-container {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 15px;
}

/* Större Klure-stil på checkboxen */
.klure-large-checkbox input[type="checkbox"] {
  width: 22px;
  height: 22px;
  min-width: 22px;
  min-height: 22px;
  margin-top: 2px;
  margin-right: 15px;
  cursor: pointer;
  accent-color: #F39AC0;
  border-radius: 6px;
  flex-shrink: 0;
}

.klure-large-checkbox label {
  font-size: 1rem;
  color: #444;
  font-weight: 500;
  line-height: 1.5;
  cursor: pointer;
}
