/* Modern, responsive modal calculator */
:root{
  --fc-bg: rgba(0,0,0,.55);
  --fc-card: #ffffff;
  --fc-text: #101828;
  --fc-muted: #475467;
  --fc-border: #EAECF0;
  --fc-shadow: 0 20px 70px rgba(16, 24, 40, .22);
  --fc-radius: 18px;
  --fc-radius-sm: 14px;
  --fc-pad: 18px;
}

.fc-wrap { margin: 12px 0; }

.fc-btn{
  display:inline-flex;
  align-items:center;
  gap:10px;
  border: 1px solid var(--fc-border);
  border-radius: 999px;
  background: #fff;
  color: var(--fc-text);
  padding: 12px 16px;
  font-weight: 600;
  cursor:pointer;
  box-shadow: 0 10px 30px rgba(16,24,40,.06);
  transition: transform .08s ease, box-shadow .2s ease;
}
.fc-btn:hover{ box-shadow: 0 16px 40px rgba(16,24,40,.10); }
.fc-btn:active{ transform: translateY(1px); }
.fc-btn__icon{
  width:28px;height:28px;
  display:inline-grid;
  place-items:center;
  border-radius: 10px;
  background: #F2F4F7;
}

.fc-lock{ overflow:hidden; }

.fc-modal{
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
}
.fc-modal.is-open{ display:block; }

.fc-backdrop{
  position:absolute;
  inset:0;
  background: var(--fc-bg);
}

.fc-panel{
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%,-50%);
  width: min(980px, calc(100vw - 26px));
  max-height: min(90vh, 860px);
  overflow: auto;
  background: var(--fc-card);
  border-radius: var(--fc-radius);
  box-shadow: var(--fc-shadow);
  border: 1px solid rgba(234, 236, 240, .9);
}

.fc-header{
  display:flex;
  align-items:flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 18px 10px 18px;
  border-bottom: 1px solid var(--fc-border);
  position: sticky;
  top: 0;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  z-index: 2;
}

.fc-title__kicker{
  font-size: 16px;
  font-weight: 800;
  color: var(--fc-text);
}
.fc-title__sub{
  margin-top: 4px;
  font-size: 13px;
  color: var(--fc-muted);
}

.fc-x{
  border: 1px solid var(--fc-border);
  border-radius: 12px;
  background:#fff;
  width: 38px;
  height: 38px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}

.fc-body{ padding: 16px 18px 18px 18px; }

.fc-grid{
  display:grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 14px;
}

.fc-card{
  border: 1px solid var(--fc-border);
  border-radius: var(--fc-radius-sm);
  padding: var(--fc-pad);
  background:#fff;
}

.fc-card__title{
  font-weight: 800;
  color: var(--fc-text);
  margin-bottom: 12px;
}

.fc-row{ margin-top: 12px; }
.fc-row--split{
  margin-top: 18px;
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 14px;
}

.fc-label{
  display:block;
  font-size: 12px;
  font-weight: 700;
  color: var(--fc-muted);
  margin-bottom: 6px;
}

.fc-muted{ color: var(--fc-muted); font-size: 13px; }
.fc-muted--small{ font-size: 12px; }

.fc-input{
  width:100%;
  height: 50px;
  border: 1px solid var(--fc-border);
  border-radius: 12px;
  padding: 12px 12px;
  font-size: 14px;
  outline: none;
}
.fc-input:focus{
  border-color: #98A2B3;
  box-shadow: 0 0 0 4px rgba(152,162,179,.20);
}

.fc-room{
  border: 1px solid var(--fc-border);
  border-radius: 14px;
  padding: 12px;
  margin-top: 12px;
  background: #FCFCFD;
}
.fc-room__head{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.fc-room__title{ font-weight: 800; font-size: 13px; color: var(--fc-text); }
.fc-room__remove{
  border:none;
  background: transparent;
  color: #B42318;
  font-weight: 700;
  cursor:pointer;
  padding: 6px 8px;
  border-radius: 10px;
}
.fc-room__remove:hover{ background: rgba(180,35,24,.08); }

.fc-room__grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.fc-actions{ margin-top: 10px; }
.fc-link{
  border: none;
  background: #F2F4F7;
  border-radius: 999px;
  padding: 10px 12px;
  cursor:pointer;
  font-weight: 800;
}

.fc-actions--cta{
  margin-top: 14px;
  display:grid;
  gap: 6px;
}
.fc-btn-primary{
  width:100%;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  border-radius: 12px;
  padding: 14px 16px;
  border: 1px solid #101828;
  background: #101828;
  color:#fff;
  font-weight: 800;
  cursor:pointer;
  box-shadow: 0 12px 30px rgba(16,24,40,.16);
  transition: transform .08s ease, box-shadow .2s ease, background .2s ease;
}
.fc-btn-primary:hover{ background:#0f172a; box-shadow: 0 16px 36px rgba(16,24,40,.20); }
.fc-btn-primary:active{ transform: translateY(1px); }
.fc-btn-primary[disabled]{ opacity:.6; cursor:not-allowed; box-shadow:none; }
.fc-add-status{
  min-height: 18px;
  font-size: 12px;
  color: var(--fc-muted);
}
.fc-add-status.is-success{ color: #027A48; }
.fc-add-status.is-error{ color: #B42318; }

.fc-waste{
  display:flex;
  align-items:center;
  gap: 10px;
  min-width: 180px;
  justify-content:flex-end;
}
.fc-range{ width: 140px; }
.fc-pill{
  border: 1px solid var(--fc-border);
  border-radius: 999px;
  padding: 8px 10px;
  font-weight: 800;
  background:#fff;
  min-width: 56px;
  text-align:center;
}

.fc-note{
  margin-top: 12px;
  padding: 12px;
  border-radius: 14px;
  border: 1px dashed var(--fc-border);
  color: var(--fc-muted);
  background: #fff;
}

.fc-card--result{
  position: sticky;
  top: 74px;
  align-self: start;
}

.fc-metrics{ display:grid; gap: 12px; }
.fc-metric{
  display:flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.fc-metric__label{ color: var(--fc-muted); font-weight: 700; font-size: 12px; }
.fc-metric__value{ color: var(--fc-text); font-weight: 900; font-size: 16px; }
.fc-metric--big .fc-metric__value{ font-size: 34px; letter-spacing: -0.5px; }

.fc-divider{
  height:1px;
  background: var(--fc-border);
  margin: 8px 0;
}

.fc-foot{ margin-top: 14px; }

@media (max-width: 900px){
  .fc-grid{ grid-template-columns: 1fr; }
  .fc-card--result{ position: static; }
  .fc-panel{
    top: auto;
    bottom: 10px;
    transform: translate(-50%, 0);
    max-height: min(92vh, 920px);
    border-radius: 22px;
  }
}