/* Calculadora Wabi Sabi: estilos de los shortcodes [wabi_calc_*] (antes en widgets HTML de Elementor) */

/* ---------- Consumo ---------- */
.ws-calc-left {
  background-color: transparent;
}

.ws-calc-left .ws-calc-headers {
  display: grid;
  grid-template-columns: minmax(140px, 1.65fr) minmax(90px, 1fr) minmax(90px, 1fr) minmax(80px, 0.85fr) 36px;
  gap: 12px;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
  color: #183a28;
  margin-bottom: 12px;
}

.ws-calc-left .ws-rows-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ws-calc-left .ws-row {
  display: grid;
  grid-template-columns: minmax(140px, 1.65fr) minmax(90px, 1fr) minmax(90px, 1fr) minmax(80px, 0.85fr) 36px;
  gap: 12px;
  align-items: center;
}

.ws-calc-left .ws-input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid #d2dad2;
  border-radius: 10px;
  background-color: #f4f7f2;
  font-size: 14px;
  color: #24332a;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.ws-calc-left .ws-input:focus {
  background-color: #ffffff;
  border-color: #4f8a68;
  box-shadow: 0 0 0 2px rgba(79, 138, 104, 0.16);
}

.ws-calc-left .ws-btn-delete {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #d63b3b;
  padding: 0;
  border-radius: 8px;
  line-height: 1;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.ws-calc-left .ws-btn-delete svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.ws-calc-left .ws-btn-delete:hover {
  background-color: rgba(214, 59, 59, 0.1);
  color: #b32424;
}

.ws-calc-left .ws-btn-add {
  margin-top: 16px;
  padding: 10px 16px;
  border: 1px solid #9ec7ae;
  border-radius: 10px;
  background-color: #f4f7f2;
  color: #235c3d;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.ws-calc-left .ws-btn-add:hover {
  background-color: #e8f2eb;
  border-color: #79b090;
}

@media (max-width: 640px) {
  .ws-calc-left .ws-calc-headers {
    display: none;
  }

  .ws-calc-left .ws-row {
    grid-template-columns: 1fr 1fr;
    padding: 8px 0;
  }
}

/* ---------- Solar ---------- */
.ws-solar-left {
  background-color: transparent;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.ws-solar-left .ws-solar-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ws-solar-left .ws-solar-label {
  font-size: 14px;
  font-weight: 700;
  color: #183a28;
  line-height: 1.3;
}

.ws-solar-left .ws-solar-select {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 13px 40px 13px 14px;
  border: 1px solid #d2dad2;
  border-radius: 10px;
  background-color: #f4f7f2;
  font-size: 14px;
  color: #24332a;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2324332a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.ws-solar-left .ws-solar-select:focus {
  background-color: #ffffff;
  border-color: #4f8a68;
  box-shadow: 0 0 0 2px rgba(79, 138, 104, 0.16);
}

/* ---------- Inversor ---------- */
.ws-inv-left {
  background-color: transparent;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ws-inv-left .ws-inv-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.ws-inv-left .ws-inv-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid #d2dad2;
  border-radius: 10px;
  background-color: #f4f7f2;
  cursor: pointer;
  user-select: none;
  min-width: 0;
  box-sizing: border-box;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.ws-inv-left .ws-inv-card:hover {
  background-color: #ebf2ec;
  border-color: #9ec7ae;
}

.ws-inv-left .ws-inv-card.is-checked {
  background-color: #eef6f0;
  border-color: #5b9974;
}

.ws-inv-left .ws-inv-checkbox {
  position: relative;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  border: 1.5px solid #b5c4b8;
  border-radius: 4px;
  background-color: #ffffff;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.ws-inv-left .ws-inv-checkbox:checked {
  background-color: #1e6b43;
  border-color: #1e6b43;
}

.ws-inv-left .ws-inv-checkbox:checked::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 9px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  transform: rotate(40deg);
}

.ws-inv-left .ws-inv-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.ws-inv-left .ws-inv-title {
  font-size: 14px;
  font-weight: 700;
  color: #183a28;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ws-inv-left .ws-inv-sub {
  font-size: 12px;
  color: #55685d;
  line-height: 1.3;
}

.ws-inv-left .ws-inv-full {
  grid-column: 1 / -1;
}

.ws-inv-left .ws-inv-remove-card {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #d63b3b;
  cursor: pointer;
  padding: 0;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.ws-inv-left .ws-inv-remove-card svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.ws-inv-left .ws-inv-remove-card:hover {
  background-color: rgba(214, 59, 59, 0.12);
  color: #b32424;
}

.ws-inv-left .ws-inv-creator {
  display: grid;
  grid-template-columns: 1.5fr 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid #c5d5ca;
  border-radius: 10px;
  background-color: #f4f7f2;
}

.ws-inv-left .ws-inv-creator[hidden] {
  display: none;
}

.ws-inv-left .ws-inv-input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid #d2dad2;
  border-radius: 8px;
  background-color: #ffffff;
  font-size: 14px;
  color: #24332a;
  outline: none;
}

.ws-inv-left .ws-inv-input:focus {
  border-color: #4f8a68;
  box-shadow: 0 0 0 2px rgba(79, 138, 104, 0.16);
}

.ws-inv-left .ws-btn-confirm {
  padding: 10px 14px;
  border: none;
  border-radius: 8px;
  background-color: #1e6b43;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.ws-inv-left .ws-btn-confirm:hover {
  background-color: #175535;
}

.ws-inv-left .ws-btn-cancel {
  padding: 10px 12px;
  border: 1px solid #c5d5ca;
  border-radius: 8px;
  background-color: #ffffff;
  color: #3a4d42;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.ws-inv-left .ws-inv-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.ws-inv-left .ws-btn-add {
  padding: 10px 16px;
  border: 1px solid #9ec7ae;
  border-radius: 10px;
  background-color: #f4f7f2;
  color: #235c3d;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.ws-inv-left .ws-btn-add:hover:not(:disabled) {
  background-color: #e8f2eb;
  border-color: #79b090;
}

.ws-inv-left .ws-btn-add:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.ws-inv-left .ws-btn-clear {
  padding: 10px 14px;
  border: 1px solid #d8ded8;
  border-radius: 10px;
  background-color: #ffffff;
  color: #55685d;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.ws-inv-left .ws-btn-clear:hover {
  background-color: #f4f7f2;
  border-color: #b5c4b8;
  color: #183a28;
}

.ws-inv-left .ws-inv-limit-note {
  margin-left: auto;
  font-size: 12px;
  font-weight: 500;
  color: #55685d;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .ws-inv-left .ws-inv-grid {
    grid-template-columns: 1fr;
  }

  .ws-inv-left .ws-inv-creator {
    grid-template-columns: 1fr 1fr;
  }

  .ws-inv-left .ws-inv-creator .ws-btn-confirm,
  .ws-inv-left .ws-inv-creator .ws-btn-cancel {
    width: 100%;
  }

  .ws-inv-left .ws-inv-actions {
    width: 100%;
  }

  .ws-inv-left .ws-btn-add,
  .ws-inv-left .ws-btn-clear {
    flex: 1 1 auto;
    text-align: center;
  }

  .ws-inv-left .ws-inv-limit-note {
    width: 100%;
    margin-left: 0;
    text-align: right;
  }
}

/* ---------- Regulador ---------- */
.ws-reg-left {
  background-color: transparent;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.ws-reg-left .ws-reg-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.ws-reg-left .ws-reg-field-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.ws-reg-left .ws-reg-label {
  font-size: 14px;
  font-weight: 700;
  color: #183a28;
  line-height: 1.3;
}

.ws-reg-left .ws-reg-control {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid #d2dad2;
  border-radius: 10px;
  background-color: #f4f7f2;
  font-size: 15px;
  font-weight: 500;
  color: #24332a;
  outline: none;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.ws-reg-left .ws-reg-control:hover {
  border-color: #9ec7ae;
  background-color: #eef4ee;
}

.ws-reg-left .ws-reg-control:focus {
  background-color: #ffffff;
  border-color: #4f8a68;
  box-shadow: 0 0 0 2px rgba(79, 138, 104, 0.18);
}

.ws-reg-left .ws-reg-single {
  max-width: calc(50% - 9px);
}

@media (max-width: 640px) {
  .ws-reg-left .ws-reg-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .ws-reg-left .ws-reg-single {
    max-width: 100%;
  }
}

/* ---------- Agua ---------- */
.ws-wat-left {
  background-color: transparent;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ws-wat-left .ws-wat-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.ws-wat-left .ws-wat-field-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.ws-wat-left .ws-wat-label {
  font-size: 14px;
  font-weight: 700;
  color: #183a28;
  line-height: 1.3;
}

.ws-wat-left .ws-wat-control {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid #d2dad2;
  border-radius: 10px;
  background-color: #f4f7f2;
  font-size: 15px;
  font-weight: 500;
  color: #24332a;
  outline: none;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.ws-wat-left .ws-wat-control:hover {
  border-color: #9ec7ae;
  background-color: #eef4ee;
}

.ws-wat-left .ws-wat-control:focus {
  background-color: #ffffff;
  border-color: #4f8a68;
  box-shadow: 0 0 0 2px rgba(79, 138, 104, 0.18);
}

.ws-wat-left .ws-wat-helper {
  margin: 0;
  font-size: 13px;
  color: #55685d;
  line-height: 1.4;
}

@media (max-width: 640px) {
  .ws-wat-left .ws-wat-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}
