/* === YappyWP Styles (Material-ish) === */

.yappywp-wrap {
  max-width: 780px;
  margin: 40px auto;
  padding: 0 16px;
}

.yappywp-card{
  background:#fff;
  border-radius: 22px;
  padding: 34px;
  border: 1px solid rgba(15, 23, 42, .06);
}

/* ===== Fix BACKDROP / OVERLAY Yappy (Angular CDK) ===== */
.cdk-overlay-container,
.cdk-global-overlay-wrapper,
.cdk-overlay-pane{
  z-index: 999999 !important;
}

.cdk-overlay-container{
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
}

.cdk-overlay-backdrop{
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(0,0,0,.55) !important;
}

.cdk-global-overlay-wrapper{
  position: fixed !important;
  inset: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Brand header (logo + texto) */
.yappywp-brand{
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 8px;
}

.yappywp-logo {
  width: 80px;
  height: 80px;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  flex: 0 0 auto;
  border: 1px solid rgba(15, 23, 42, .08);
}

.yappywp-logo img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.yappywp-header-text h1{
  margin: 0 0 6px!important;
  font-size: 28px!important;
  letter-spacing: .5px!important;
  font-weight: 800!important;
  color: #0b1b2b!important;
}

.yappywp-header-text p{
  margin: 0 0 10px;
  color: #64748b;
  font-size: 14px;
}

.yappywp-card h3{
  font-size: 18px!important;
  font-weight: 600!important;
  margin: 18px 0 14px!important;
  color: #0b1b2b!important;
}

/* Grid */
.yappywp-row{
  display: grid;
  grid-gap: 14px;
  margin-bottom: 14px;
}

.yappywp-row-3{ grid-template-columns: repeat(3, 1fr); }
.yappywp-row-2{ grid-template-columns: repeat(2, 1fr); }
.yappywp-row-1{ grid-template-columns: 1fr; }

/* Inputs / Selects */
.yappywp-card input,
.yappywp-card select{
  width: 100% !important;
  height: 56px;
  border-radius: 12px !important;
  outline: none !important;
  font-size: 15px !important;

  border: 1px solid rgba(47, 67, 116, .40) !important;
  background: rgba(248, 250, 252, 1) !important;

  padding: 14px 16px !important;

  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
  -webkit-appearance: none;
}

.yappywp-card input::placeholder{
  color: rgba(100, 116, 139, .75);
}

.yappywp-card input:focus,
.yappywp-card select:focus{
  background: #fff !important;
  border-color: #2F4374 !important;
  box-shadow: 0 0 0 4px rgba(47, 67, 116, .12);
}

.yappywp-card select[disabled]{
  background: rgba(248, 250, 252, .75) !important;
  color: rgba(100, 116, 139, .85);
  border-color: rgba(47, 67, 116, .25) !important;
}

/* $ en el monto */
.yappywp-money{
  position: relative;
}

.yappywp-currency{
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 800;
  color: rgba(11, 27, 43, .70);
  pointer-events: none;
  user-select: none;
}

.yappywp-money input{
  padding-left: 34px !important;
}

/* Botón Yappy + overlay para bloquear */
.yappywp-actions{
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 14px 0 12px;
}

.yappywp-yappy-btnwrap{
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.yappywp-actions btn-yappy{
  display: flex !important;
  width: 100% !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 0 !important;
}

.yappywp-yappy-overlay{
  position: absolute;
  inset: 0;
  cursor: not-allowed;
  background: transparent;
  display: none;
  border-radius: 10px;
}

/* ✅ Botón interno del webcomponent: forzar ancho 100% para TODOS los themes */
.yappy-button.ecommerce{
  width: 100% !important;
}

/* también por si cambia el selector interno por theme */
.yappy-button.ecommerce.blue,
.yappy-button.ecommerce.darkBlue,
.yappy-button.ecommerce.orange,
.yappy-button.ecommerce.dark,
.yappy-button.ecommerce.sky{
  width: 100% !important;
}

.yappywp-actions btn-yappy.is-disabled{
  opacity: .65;
  filter: grayscale(.10);
}

/* Mensajes */
.yappywp-msg{
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 14px;
  margin-top: 10px;
  border: 1px solid rgba(15, 23, 42, .08);
  background: #f8fafc;
  color: #0b1b2b;
}

.yappywp-msg.ok{
  background: #f2fff5;
  border-color: rgba(123, 220, 149, .7);
  color: #1f3b2a;
}

.yappywp-msg.err{
  background: #fff5f5;
  border-color: rgba(255, 138, 138, .75);
  color: #2b2b2b;
}

.yappywp-note{
  margin-top: 12px;
  color: #64748b;
  font-size: 12px;
}

/* Responsive */
@media (max-width: 840px){
  .yappywp-card{ padding: 26px 18px; }
  .yappywp-row-3{ grid-template-columns: 1fr; }
  .yappywp-row-2{ grid-template-columns: 1fr; }
  .yappywp-header-text h1{ font-size: 20px!important; }

  .yappywp-brand{
    flex-direction: column;
    align-items: center!important;
  }
  .yappywp-header.yappywp-brand{
    flex-direction: column;
    align-items: center!important;
    text-align: center;
    gap: 14px;
  }

  .yappywp-logo{
    margin: 0 auto;
  }

  .yappywp-header-text{
    align-items: center!important;
    text-align: center!important;
  }

  .yappywp-header-text h1,
  .yappywp-header-text p{
    text-align: center;
  }
  
  .yappywp-card h3 {
  font-size: 16px !important;
  font-weight: 600 !important;
  margin: 18px 0 14px !important;
  color: #0b1b2b !important;
  text-align: center;
}
}



/* ✅ Flecha única (quita la nativa y deja solo la dibujada) */
#y_idtype{
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;

  background-color: #fff !important;

  background-image:
    linear-gradient(45deg, transparent 50%, #64748b 50%),
    linear-gradient(135deg, #64748b 50%, transparent 50%) !important;
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 12px) 50% !important;
  background-size: 6px 6px, 6px 6px !important;
  background-repeat: no-repeat !important;

  padding-right: 48px !important;
}

#y_idtype::-ms-expand{ display:none !important; }

/* ✅ Ocultar flechas (spinners) del input number (monto) */
#y_amount::-webkit-outer-spin-button,
#y_amount::-webkit-inner-spin-button{
  -webkit-appearance: none !important;
  margin: 0 !important;
}

#y_amount{
  -moz-appearance: textfield !important; /* Firefox */
  appearance: textfield !important;
}
