/* HidroCardsTCG — Sprint 9.3.1: botón de alerta de precio */
.product-card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.price-alert-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 13px;
  border: 1px solid rgba(245, 200, 76, 0.56);
  border-radius: 12px;
  background: rgba(245, 200, 76, 0.08);
  color: #f5c84c;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 850;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.14);
  transition: transform 0.18s ease, background 0.18s ease,
    border-color 0.18s ease, box-shadow 0.18s ease;
}

.price-alert-button:hover {
  transform: translateY(-2px);
  background: rgba(245, 200, 76, 0.15);
  border-color: #f5c84c;
  box-shadow: 0 10px 24px rgba(245, 200, 76, 0.12);
}

.price-alert-button:focus-visible {
  outline: 3px solid rgba(101, 217, 255, 0.46);
  outline-offset: 3px;
}

.price-alert-button.is-pending {
  color: #9fe9ff;
  border-color: rgba(101, 217, 255, 0.58);
  background: rgba(101, 217, 255, 0.09);
}

.price-alert-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 10000;
  max-width: min(92vw, 440px);
  padding: 13px 18px;
  border: 1px solid rgba(101, 217, 255, 0.35);
  border-radius: 12px;
  background: #0d2233;
  color: #fff;
  font-weight: 800;
  text-align: center;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.38);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 28px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.price-alert-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 640px) {
  .product-card-actions {
    gap: 8px;
  }

  .price-alert-button {
    width: 42px;
    min-width: 42px;
    padding: 0;
    border-radius: 50%;
  }

  .price-alert-button-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

/* Sprint 9.3.2 — modal de captura de precio objetivo */
body.price-alert-modal-open {
  overflow: hidden;
}

.price-alert-modal[hidden] {
  display: none;
}

.price-alert-modal {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: grid;
  place-items: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.price-alert-modal.is-open {
  opacity: 1;
}

.price-alert-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 10, 18, 0.76);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.price-alert-dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 520px);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 30px;
  border: 1px solid rgba(101, 217, 255, 0.26);
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(245, 200, 76, 0.12), transparent 34%),
    linear-gradient(155deg, #102b3f 0%, #0a1c2c 100%);
  color: #f7fbff;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.54);
  transform: translateY(16px) scale(0.98);
  transition: transform 0.18s ease;
}

.price-alert-modal.is-open .price-alert-dialog {
  transform: translateY(0) scale(1);
}

.price-alert-dialog__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font: inherit;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.price-alert-dialog__close:hover {
  background: rgba(255, 255, 255, 0.12);
}

.price-alert-dialog__icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  border: 1px solid rgba(245, 200, 76, 0.34);
  border-radius: 16px;
  background: rgba(245, 200, 76, 0.1);
  font-size: 1.6rem;
}

.price-alert-dialog__eyebrow {
  margin: 0 0 6px;
  color: #f5c84c;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.price-alert-dialog h2 {
  margin: 0;
  font-size: clamp(1.5rem, 4vw, 2rem);
  line-height: 1.15;
}

.price-alert-dialog__description {
  margin: 10px 0 22px;
  color: #aac2d2;
  line-height: 1.55;
}

.price-alert-product-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  margin-bottom: 22px;
  padding: 16px;
  border: 1px solid rgba(101, 217, 255, 0.14);
  border-radius: 15px;
  background: rgba(3, 15, 25, 0.38);
}

.price-alert-product-summary div {
  min-width: 0;
}

.price-alert-product-summary span,
.price-alert-field > span {
  display: block;
  margin-bottom: 5px;
  color: #8fb1c5;
  font-size: 0.78rem;
  font-weight: 800;
}

.price-alert-product-summary strong {
  display: block;
  overflow-wrap: anywhere;
}

.price-alert-product-summary div:last-child {
  text-align: right;
}

.price-alert-product-summary div:last-child strong {
  color: #f5c84c;
  white-space: nowrap;
}

.price-alert-field {
  display: block;
}

.price-alert-money-input {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 15px;
  border: 1px solid rgba(101, 217, 255, 0.28);
  border-radius: 14px;
  background: rgba(2, 13, 22, 0.66);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.price-alert-money-input:focus-within {
  border-color: #65d9ff;
  box-shadow: 0 0 0 4px rgba(101, 217, 255, 0.1);
}

.price-alert-money-input > span {
  color: #f5c84c;
  font-size: 1.15rem;
  font-weight: 900;
}

.price-alert-money-input input {
  min-width: 0;
  width: 100%;
  padding: 14px 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 1.15rem;
  font-weight: 900;
}

.price-alert-money-input input::placeholder {
  color: #69889b;
}

.price-alert-money-input small {
  color: #8fb1c5;
  font-weight: 900;
}

.price-alert-money-input:has(input[aria-invalid="true"]) {
  border-color: #ff7e89;
  box-shadow: 0 0 0 4px rgba(255, 126, 137, 0.09);
}

.price-alert-field__help,
.price-alert-field__error {
  margin: 8px 2px 0;
  font-size: 0.78rem;
  line-height: 1.4;
}

.price-alert-field__help {
  color: #86a7b9;
}

.price-alert-field__error {
  min-height: 1.1em;
  color: #ff9ca5;
  font-weight: 800;
}

.price-alert-dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

.price-alert-secondary-button,
.price-alert-primary-button {
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 12px;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.price-alert-secondary-button {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.05);
  color: #dceaf2;
}

.price-alert-primary-button {
  border: 1px solid #f5c84c;
  background: linear-gradient(135deg, #f5c84c, #dcae24);
  color: #17202a;
  box-shadow: 0 10px 24px rgba(245, 200, 76, 0.18);
}

.price-alert-secondary-button:hover,
.price-alert-primary-button:hover {
  transform: translateY(-1px);
}

.price-alert-toast[data-type="success"] {
  border-color: rgba(83, 225, 160, 0.48);
  background: #0e3029;
}

@media (max-width: 560px) {
  .price-alert-modal {
    align-items: end;
    padding: 10px;
  }

  .price-alert-dialog {
    width: 100%;
    max-height: calc(100vh - 20px);
    padding: 24px 18px 18px;
    border-radius: 20px;
  }

  .price-alert-product-summary {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .price-alert-product-summary div:last-child {
    text-align: left;
  }

  .price-alert-dialog__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

/* Sprint 9.3.3 — alerta ya guardada */
.price-alert-button.is-created {
  color: #9fe9ff;
  border-color: rgba(101, 217, 255, 0.7);
  background: rgba(101, 217, 255, 0.13);
  box-shadow: 0 8px 22px rgba(101, 217, 255, 0.12);
}

.price-alert-button.is-created:hover {
  background: rgba(101, 217, 255, 0.18);
  border-color: #65d9ff;
}

.price-alert-primary-button:disabled {
  cursor: wait;
  opacity: 0.7;
}

/* Sprint 9.3.4 — Página Mis alertas */
.alerts-page{min-height:100vh;padding:110px 20px 70px;background:radial-gradient(circle at top,#153b5b 0,#07131f 48%,#03080d 100%);color:#fff}.alerts-shell{width:min(1120px,100%);margin:auto}.alerts-back{display:inline-flex;margin-bottom:18px;color:#b8c8d3;text-decoration:none}.alerts-heading{display:flex;justify-content:space-between;align-items:end;gap:20px;margin-bottom:28px}.alerts-heading h1{font-size:clamp(2rem,5vw,3.5rem);margin:.3rem 0}.alerts-heading p{color:#b8c8d3}.alerts-count{min-width:130px;padding:15px 18px;border:1px solid #2b5068;border-radius:16px;background:#0d2233;text-align:center}.alerts-count strong{display:block;font-size:1.8rem;color:#f5c84c}.alerts-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.price-alert-card{display:grid;grid-template-columns:180px 1fr;overflow:hidden;border:1px solid #26465a;border-radius:20px;background:#0d2233}.price-alert-card__image{min-height:270px;background:#07131f;display:grid;place-items:center}.price-alert-card__image img{width:100%;height:100%;object-fit:cover}.price-alert-card__image span{font-size:4rem}.price-alert-card__content{padding:22px;display:flex;flex-direction:column;gap:9px}.price-alert-card__topline{display:flex;justify-content:space-between;gap:10px;color:#90a8b7;font-size:.78rem;text-transform:uppercase;font-weight:800}.price-alert-status{white-space:nowrap}.price-alert-status.is-waiting{color:#f5c84c}.price-alert-status.is-reached{color:#76e0a7}.price-alert-card h2{margin:0;font-size:1.2rem}.price-alert-card p,.price-alert-card small{margin:0;color:#aebdc7}.price-alert-values{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:auto;padding-top:12px}.price-alert-values div{padding:12px;border:1px solid #28475b;border-radius:12px;background:#091a28}.price-alert-values span{display:block;margin-bottom:5px;color:#91a8b7;font-size:.72rem;font-weight:800;text-transform:uppercase}.price-alert-values strong{font-size:1.1rem;color:#f5c84c}.price-alert-values div:first-child strong{color:#fff}.price-alert-card__actions{display:flex;gap:10px;margin-top:12px}.price-alert-card__actions a,.price-alert-card__actions button{flex:1;text-align:center;padding:11px 12px;border-radius:10px;font-weight:800;text-decoration:none}.price-alert-card__actions a{background:#16709a;color:#fff}.price-alert-card__actions button{border:1px solid #a93647;background:transparent;color:#ff9caa;cursor:pointer}.price-alert-card__actions button:disabled{opacity:.55;cursor:wait}.alerts-empty,.alerts-loading{padding:60px 20px;text-align:center;border:1px dashed #31546a;border-radius:20px;background:rgba(13,34,51,.75)}.alerts-empty a{display:inline-flex;margin-top:16px;padding:12px 18px;border-radius:11px;background:#f5c84c;color:#111;text-decoration:none;font-weight:900}.alerts-page-toast{position:fixed;left:50%;bottom:28px;z-index:9999;transform:translate(-50%,30px);opacity:0;pointer-events:none;padding:13px 18px;border-radius:12px;background:#153f30;color:#fff;font-weight:800;box-shadow:0 18px 50px rgba(0,0,0,.35);transition:.25s ease}.alerts-page-toast[data-type="error"]{background:#922f3b}.alerts-page-toast.is-visible{opacity:1;transform:translate(-50%,0)}@media(max-width:820px){.alerts-grid{grid-template-columns:1fr}}@media(max-width:540px){.alerts-heading{align-items:flex-start;flex-direction:column}.price-alert-card{grid-template-columns:120px 1fr}.price-alert-card__image{min-height:230px}.price-alert-card__content{padding:16px}.price-alert-values{grid-template-columns:1fr}.price-alert-card__actions{flex-direction:column}}

/* Sprint 9.3.5 — edición del precio objetivo */
.price-alert-card__actions{flex-wrap:wrap}.price-alert-card__actions a,.price-alert-card__actions button{min-width:105px}.price-alert-card__actions .price-alert-edit-button{border:1px solid rgba(101,217,255,.55);background:rgba(101,217,255,.08);color:#9fe9ff}.price-alert-card__actions .price-alert-edit-button:hover{background:rgba(101,217,255,.15);border-color:#65d9ff}.price-alert-card__actions .price-alert-delete-button{border:1px solid #a93647;background:transparent;color:#ff9caa}body.alerts-edit-modal-open{overflow:hidden}.alerts-edit-modal[hidden]{display:none}.alerts-edit-modal{position:fixed;inset:0;z-index:13000;display:grid;place-items:center;padding:20px;opacity:0;transition:opacity .18s ease}.alerts-edit-modal.is-open{opacity:1}.alerts-edit-modal__backdrop{position:absolute;inset:0;background:rgba(2,10,18,.78);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}.alerts-edit-dialog{position:relative;z-index:1;width:min(100%,500px);padding:30px;border:1px solid rgba(101,217,255,.3);border-radius:22px;background:radial-gradient(circle at top right,rgba(245,200,76,.12),transparent 35%),linear-gradient(155deg,#102b3f,#081824);color:#fff;box-shadow:0 28px 80px rgba(0,0,0,.55);transform:translateY(16px) scale(.98);transition:transform .18s ease}.alerts-edit-modal.is-open .alerts-edit-dialog{transform:none}.alerts-edit-dialog__close{position:absolute;top:14px;right:14px;width:38px;height:38px;display:grid;place-items:center;border:1px solid rgba(255,255,255,.16);border-radius:50%;background:rgba(255,255,255,.06);color:#fff;font:inherit;font-size:1.5rem;cursor:pointer}.alerts-edit-dialog__icon{width:52px;height:52px;display:grid;place-items:center;margin-bottom:14px;border:1px solid rgba(245,200,76,.34);border-radius:15px;background:rgba(245,200,76,.1);font-size:1.5rem}.alerts-edit-dialog__eyebrow{margin:0 0 6px;color:#f5c84c;font-size:.78rem;font-weight:900;letter-spacing:.12em;text-transform:uppercase}.alerts-edit-dialog h2{margin:0;font-size:1.7rem}.alerts-edit-dialog__description{margin:8px 0 20px;color:#aac2d2}.alerts-edit-current{display:flex;justify-content:space-between;gap:16px;margin-bottom:18px;padding:14px 16px;border:1px solid #28475b;border-radius:13px;background:#091a28}.alerts-edit-current span{color:#91a8b7;font-size:.78rem;font-weight:800;text-transform:uppercase}.alerts-edit-current strong{color:#fff}.alerts-edit-field>span{display:block;margin-bottom:7px;color:#b7cbd8;font-size:.82rem;font-weight:800}.alerts-edit-money-input{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:10px;padding:0 15px;border:1px solid rgba(101,217,255,.3);border-radius:14px;background:rgba(2,13,22,.66)}.alerts-edit-money-input:focus-within{border-color:#65d9ff;box-shadow:0 0 0 4px rgba(101,217,255,.1)}.alerts-edit-money-input>span{color:#f5c84c;font-size:1.15rem;font-weight:900}.alerts-edit-money-input input{width:100%;min-width:0;padding:14px 0;border:0;outline:0;background:transparent;color:#fff;font:inherit;font-size:1.1rem;font-weight:900}.alerts-edit-money-input small{color:#8fb1c5;font-weight:900}.alerts-edit-money-input:has(input[aria-invalid="true"]){border-color:#ff7e89;box-shadow:0 0 0 4px rgba(255,126,137,.09)}.alerts-edit-help,.alerts-edit-error{margin:8px 2px 0;font-size:.78rem;line-height:1.4}.alerts-edit-help{color:#86a7b9}.alerts-edit-error{min-height:1.1em;color:#ff9ca5;font-weight:800}.alerts-edit-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:20px}.alerts-edit-actions button{min-height:44px;padding:10px 16px;border-radius:12px;font:inherit;font-weight:900;cursor:pointer}.alerts-edit-cancel{border:1px solid rgba(255,255,255,.18);background:rgba(255,255,255,.05);color:#dceaf2}.alerts-edit-save{border:1px solid #f5c84c;background:linear-gradient(135deg,#f5c84c,#dcae24);color:#17202a}.alerts-edit-save:disabled{opacity:.7;cursor:wait}@media(max-width:540px){.alerts-edit-modal{align-items:end;padding:10px}.alerts-edit-dialog{padding:24px 18px 18px;border-radius:20px}.alerts-edit-actions{display:grid;grid-template-columns:1fr 1fr}.price-alert-card__actions a,.price-alert-card__actions button{min-width:0}}


/* Sprint 9.3.6: alerta cuyo precio objetivo ya fue alcanzado */
.price-alert-button.is-created.is-reached {
  border-color: rgba(118, 224, 167, 0.9);
  background: linear-gradient(135deg, rgba(20, 111, 77, 0.96), rgba(12, 73, 54, 0.96));
  color: #eafff3;
  box-shadow: 0 0 0 1px rgba(118, 224, 167, 0.12), 0 10px 24px rgba(0, 0, 0, 0.28);
}

.price-alert-button.is-created.is-reached:hover {
  border-color: #76e0a7;
  background: linear-gradient(135deg, rgba(25, 130, 91, 0.98), rgba(14, 85, 62, 0.98));
}


/* Sprint 9.3.7 — avisos de precio alcanzado */
.alerts-summary{display:flex;align-items:stretch;gap:12px}.alerts-pending{min-width:106px;padding:12px 16px;border:1px solid rgba(255,255,255,.12);border-radius:16px;background:rgba(255,255,255,.04);text-align:center}.alerts-pending strong,.alerts-pending span{display:block}.alerts-pending strong{font-size:1.55rem}.alerts-pending span{color:#9eb7c7;font-size:.75rem;font-weight:800}.alerts-pending.has-pending{border-color:rgba(72,220,145,.48);background:rgba(72,220,145,.10);box-shadow:0 0 22px rgba(72,220,145,.10)}.alerts-pending.has-pending strong{color:#6ff0ad}.price-alert-notice{margin-top:16px;padding:12px 14px;border:1px solid rgba(72,220,145,.34);border-radius:12px;background:rgba(72,220,145,.09);color:#9af4c5;font-size:.86rem;font-weight:800}.price-alert-review-button{border:1px solid rgba(72,220,145,.44)!important;background:rgba(72,220,145,.10)!important;color:#8ef0ba!important}.price-alert-review-button:hover{background:rgba(72,220,145,.18)!important}@media(max-width:640px){.alerts-heading{align-items:flex-start}.alerts-summary{width:100%}.alerts-summary>div{flex:1}}
