/* ══════════════════════════════
   CALCULATOR
   ══════════════════════════════ */

.calculator-content {
  width: 100%;
}

.calculator-content form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* On centre les éléments après la première ligne */
.calc-level-row,
.calc-variante-wrapper,
.calc-mutations-row,
.calc-submit-row {
  max-width: 680px;
  width: 100%;
  margin: 0 auto;
}

/* ── LIGNE 1 : Brainrot select + Value ── */
.calc-row-top {
  display: flex;
  gap: 16px;
  align-items: stretch;
}

/* Select brainrot */
.calc-brainrot-wrapper {
  flex: 1;
  position: relative;
  background: #fff;
  border: 2px solid #ccc;
  border-radius: 16px;
  min-height: 120px;
  display: block;
  overflow: visible;
  transition: min-height 0.3s ease;
}

.calc-brainrot-wrapper.has-selection {
  min-height: 180px;
}

/* Flèche dropdown custom en haut à droite */
.calc-brainrot-wrapper::after {
  content: '▼';
  position: absolute;
  top: 12px;
  right: 14px;
  font-size: 18px;
  color: var(--teal-dark);
  pointer-events: none;
  z-index: 10;
}

.calc-brainrot-wrapper select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-family: 'Nunito', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #555;
  text-align: center;
  padding: 16px 40px 16px 16px;
  cursor: pointer;
  min-height: 120px;
}

/* ── CUSTOM SELECT BRAINROT ── */
.custom-select {
  position: relative;
  width: 100%;
  height: 100%;
}

.select-selected {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  color: var(--teal-dark);
  gap: 5px;
  z-index: 5;
}

.has-selection .select-img {
  width: 100px;
  height: 100px;
}

.select-img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  transition: all 0.3s ease;
}

.select-items {
  position: absolute;
  background-color: #fff;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 99;
  border: 2px solid #ccc;
  border-top: none;
  border-radius: 0 0 16px 16px;
  max-height: 400px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.select-search-wrapper {
  padding: 10px;
  background: #f9f9f9;
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 0;
  z-index: 10;
}

#brainrotSearch {
  width: 100%;
  padding: 10px 15px;
  border: 2px solid #ddd;
  border-radius: 20px;
  font-family: 'Nunito', sans-serif;
  font-size: 14px;
  outline: none;
  box-sizing: border-box;
}

#brainrotSearch:focus {
  border-color: var(--teal-dark);
}

.brainrot-options-container {
  overflow-y: auto;
  flex: 1;
}

.select-items div.brainrot-option {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  padding: 12px;
  cursor: pointer;
  border-bottom: 1px solid #eee;
  transition: background 0.2s;
  gap: 12px;
}

.select-items div:last-child {
  border-bottom: none;
}

.select-items div:hover {
  background-color: #f1f1f1;
}

.option-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.option-text {
  font-size: 14px;
  font-weight: 700;
  color: #555;
}

.select-hide {
  display: none;
}

.same-as-selected {
  background-color: #e8f0ef;
}

/* Bloc value/s */
.calc-value-box {
  flex: 1;
  background: var(--teal-dark);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  min-height: 120px;
  gap: 10px;
  transition: min-height 0.3s ease;
}

.calc-value-box.has-selection {
  min-height: 180px;
}

.calc-value-title {
  font-family: 'Nunito', sans-serif;
  font-size: 1.5rem;
  font-weight: 900;
  color: #fff;
  text-align: center;
}

.calc-value-result {
  font-family: 'Nunito', sans-serif;
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--accent-yellow);
  min-height: 36px;
  text-align: center;
}

/* ── LIGNE 2 : Level ── */
.calc-level-row {
  display: flex;
  align-items: center;
  background: var(--teal-dark);
  border-radius: 40px;
  padding: 14px 24px;
  gap: 20px;
}

.calc-level-label {
  font-family: 'Nunito', sans-serif;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  flex-shrink: 0;
}

.calc-level-input {
  flex: 1;
  border: none;
  outline: none;
  border-radius: 30px;
  padding: 10px 20px;
  font-family: 'Nunito', sans-serif;
  font-size: 16px;
  font-weight: 800;
  color: var(--teal-dark);
  text-align: center;
  background: #fff;
  max-width: 160px;
  margin-left: auto;
}

/* ── LIGNE 3 : Variante select ── */
.calc-variante-wrapper {
  position: relative;
  background: var(--teal-dark);
  border-radius: 40px;
  overflow: hidden;
}

.calc-variante-wrapper::after {
  content: '▼';
  position: absolute;
  top: 50%;
  right: 24px;
  transform: translateY(-50%);
  font-size: 20px;
  color: #fff;
  pointer-events: none;
}

.calc-variante-wrapper select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-family: 'Nunito', sans-serif;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 18px 50px 18px 30px;
  cursor: pointer;
}

.calc-variante-wrapper select option {
  color: var(--teal-dark);
  background: #fff;
  font-weight: 700;
}

/* ── LIGNE 4 : Mutations (images checkbox) ── */
.calc-mutations-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.mutation-toggle {
  position: relative;
  cursor: pointer;
}

/* Cache la checkbox native */
.mutation-toggle input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.mutation-toggle-img {
  width: 80px;
  height: 80px;
  border-radius: 18px;
  object-fit: cover;
  display: block;
  border: 3px solid transparent;
  background: #e8f0ef;
  transition: border-color 0.2s, transform 0.18s cubic-bezier(.34,1.56,.64,1), box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* Non cochée = fond clair */
.mutation-toggle input:not(:checked) + .mutation-toggle-img {
  filter: grayscale(0.1);
  opacity: 0.75;
}

/* Cochée = bordure teal + légère élévation */
.mutation-toggle input:checked + .mutation-toggle-img {
  border-color: var(--teal-dark);
  opacity: 1;
  filter: none;
  transform: scale(1.08);
  box-shadow: 0 6px 18px rgba(13,74,74,0.25);
}

.mutation-toggle:hover .mutation-toggle-img {
  transform: scale(1.06);
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

/* ── BOUTON CALCULATE ── */
.calc-submit-row {
  display: flex;
  justify-content: center;
}

.btn-calculate {
  background: var(--teal-dark);
  color: #fff;
  border: none;
  border-radius: 40px;
  padding: 16px 60px;
  width: auto;
  font-family: 'Nunito', sans-serif;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
  transition: background 0.2s, transform 0.18s cubic-bezier(.34,1.56,.64,1);
}
.btn-calculate:hover {
  background: var(--teal-mid);
  transform: translateY(-3px);
}
