/* Impact giving grid — [dd_giving_grid] shortcode + in-modal picker
   Scoped with button element selectors to beat Elementor global button styles. */

.dd-grid{
  --dd-brand:#004876;
  --dd-navy:#0d2c4a;
  --dd-gold:#f5a800;
  --dd-gold-hover:#dc9700;
  --dd-cream:#fff8e1;
  --dd-fonseca:"Fonseca Rounded", Sans-serif;
  background:var(--dd-cream);
  border-radius:14px;
  padding:24px 26px 26px;
  font-family:'Prompt', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  width:100%;
  max-width:100%;
  box-sizing:border-box;
  overflow:hidden;
}
.dd-grid *,
.dd-grid *::before,
.dd-grid *::after{box-sizing:border-box;}

.dd-grid__lead{
  margin:0 0 16px;
  font-size:16px;
  color:#3f4a5a;
  line-height:1.4;
}

.dd-grid__tiers{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:12px;
}

/* Tier buttons — explicit reset vs Elementor `button { border: 1px solid #cc3366 }` */
.dd-grid button.dd-grid__tier{
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  gap:6px;
  width:100%;
  min-width:0;
  max-width:100%;
  min-height:120px;
  margin:0;
  padding:14px 10px;
  border:1px solid #e6e2cf;
  border-radius:12px;
  background:#ffffff;
  background-color:#ffffff;
  color:inherit;
  cursor:pointer;
  text-align:center;
  font-family:inherit;
  font-size:inherit;
  font-weight:inherit;
  line-height:inherit;
  letter-spacing:normal;
  text-transform:none;
  text-decoration:none;
  box-shadow:none;
  outline:none;
  overflow:hidden;
  white-space:normal;
  text-overflow:clip;
  -webkit-appearance:none;
  appearance:none;
  transition:border-color .15s ease, box-shadow .15s ease, background .15s ease, background-color .15s ease;
}
.dd-grid button.dd-grid__tier:hover,
.dd-grid button.dd-grid__tier:focus{
  background:#ffffff;
  background-color:#ffffff;
  border-color:#e6e2cf;
  color:inherit;
  box-shadow:0 4px 14px rgba(13,44,74,.12);
}

.dd-grid__amount{
  display:block;
  font-family:var(--dd-fonseca);
  font-size:24px;
  font-weight:800;
  color:var(--dd-brand);
  line-height:1.1;
}
.dd-grid__label{
  display:block;
  width:100%;
  max-width:14em;
  margin:0 auto;
  font-size:13px;
  color:#7a8494;
  line-height:1.35;
  white-space:normal;
  overflow:visible;
  text-overflow:clip;
  overflow-wrap:anywhere;
  word-break:break-word;
  hyphens:auto;
}

.dd-grid button.dd-grid__tier.is-selected,
.dd-grid button.dd-grid__tier.is-selected:hover,
.dd-grid button.dd-grid__tier.is-selected:focus{
  background:var(--dd-navy);
  background-color:var(--dd-navy);
  border-color:var(--dd-navy);
  color:#ffffff;
  box-shadow:none;
}
.dd-grid button.dd-grid__tier.is-selected .dd-grid__amount{color:var(--dd-gold);}
.dd-grid button.dd-grid__tier.is-selected .dd-grid__label{color:#ffffff;}

/* Other tile with amount input */
.dd-grid .dd-grid__tier--other{
  padding:0;
  overflow:hidden;
  cursor:default;
  background:#ffffff;
  background-color:#ffffff;
  border:none;
  border-radius:12px;
}
.dd-grid .dd-grid__tier--other:hover,
.dd-grid .dd-grid__tier--other:focus{
  box-shadow:none;
  border:none;
}
.dd-grid__other-wrap{
  display:flex;
  align-items:center;
  gap:6px;
  width:100%;
  height:100%;
  min-height:96px;
  padding:16px 18px;
  margin:0;
  cursor:text;
}
.dd-grid__other-currency{
  font-family:var(--dd-fonseca);
  font-size:24px;
  font-weight:800;
  color:#9aa2b1;
}
.dd-grid .dd-grid__other-input{
  border:none !important;
}
.dd-grid__other-input{
  flex:1 1 auto;
  min-width:0;
  margin:0;
  padding:0;
  border:none;
  outline:none;
  background:transparent;
  background-color:transparent;
  font-family:var(--dd-fonseca);
  font-size:22px;
  font-weight:700;
  color:var(--dd-brand);
  box-shadow:none;
  -webkit-appearance:none;
  appearance:none;
}
.dd-grid__other-input::placeholder{color:#9aa2b1;font-weight:700;opacity:1;}
.dd-grid .dd-grid__tier--other.is-selected{
  background:#ffffff;
  background-color:#ffffff;
  border:none;
  border-radius:12px;
  box-shadow:0 4px 14px rgba(13,44,74,.12);
}
.dd-grid .dd-grid__tier--other.is-selected .dd-grid__other-input{color:var(--dd-brand);}

/* Monthly toggle */
.dd-grid__monthly{
  display:flex;
  align-items:center;
  gap:12px;
  margin:20px 0 18px;
}
.dd-grid button.dd-grid__switch{
  position:relative;
  flex:0 0 auto;
  width:52px;
  height:28px;
  margin:0;
  padding:0;
  border:none;
  border-radius:999px;
  background:#c9cdd6;
  background-color:#c9cdd6;
  cursor:pointer;
  box-shadow:none;
  outline:none;
  -webkit-appearance:none;
  appearance:none;
  transition:background .15s ease, background-color .15s ease;
}
.dd-grid button.dd-grid__switch:hover,
.dd-grid button.dd-grid__switch:focus{
  background:#c9cdd6;
  background-color:#c9cdd6;
  border:none;
  color:inherit;
}
.dd-grid button.dd-grid__switch::after{
  content:"";
  position:absolute;
  top:3px;
  left:3px;
  width:22px;
  height:22px;
  border-radius:50%;
  background:#fff;
  box-shadow:0 1px 3px rgba(0,0,0,.3);
  transition:transform .18s ease;
}
.dd-grid button.dd-grid__switch[aria-pressed="true"],
.dd-grid button.dd-grid__switch[aria-pressed="true"]:hover,
.dd-grid button.dd-grid__switch[aria-pressed="true"]:focus{
  background:var(--dd-navy);
  background-color:var(--dd-navy);
  border:none;
}
.dd-grid button.dd-grid__switch[aria-pressed="true"]::after{transform:translateX(24px);}

.dd-grid__monthly-text{
  font-size:16px;
  color:var(--dd-brand);
  line-height:1.35;
}
.dd-grid__monthly-text strong{font-weight:700;}

.dd-grid button.dd-grid__btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  margin:0;
  padding:15px 30px;
  border:none;
  border-radius:999px;
  background:#f5a800;
  background-color:#f5a800;
  color:var(--dd-brand);
  font-family:var(--dd-fonseca);
  font-size:16px;
  font-weight:800;
  letter-spacing:1px;
  text-transform:uppercase;
  text-decoration:none;
  cursor:pointer;
  box-shadow:0 6px 16px rgba(245,168,0,.32);
  outline:none;
  -webkit-appearance:none;
  appearance:none;
  transition:background .15s ease, background-color .15s ease, transform .05s ease;
}
.dd-grid button.dd-grid__btn:hover,
.dd-grid button.dd-grid__btn:focus{
  background:var(--dd-gold-hover);
  background-color:var(--dd-gold-hover);
  border:none;
  color:var(--dd-brand);
}
.dd-grid button.dd-grid__btn:active{transform:translateY(1px);}
.dd-grid__btn-arrow{font-size:16px;line-height:1;}

@media (max-width:680px){
  .dd-grid__tiers{grid-template-columns:repeat(2, minmax(0, 1fr));}
  .dd-grid button.dd-grid__btn{width:100%;}
}
@media (max-width:400px){
  .dd-grid__tiers{grid-template-columns:minmax(0, 1fr);}
  .dd-grid__label{font-size:12px;}
}
