/* Unified calculator components: buttons, forms, cards */

/* Cards */
.isc1__card,
.isc2__card,
#isc3-root .card,
.isc4-card,
.isc4-import-card{
  background:#fff;
  border-radius:14px;
  box-shadow:0 18px 55px rgba(0,0,0,.08);
}

/* Page-specific card spacing kept in local styles where needed */

/* Form controls */
.isc1__input,
.isc2__input,
#isc3-root input,
#isc3-root select,
.isc4-input,
.isc4-select{
  background:#fff;
  border:1px solid #d9e3ea;
  border-radius:12px;
  padding:10px 12px;
  font-size:14px;
  outline:none;
  box-sizing:border-box;
}

.isc1__input:focus,
.isc2__input:focus,
#isc3-root input:focus,
#isc3-root select:focus,
.isc4-input:focus,
.isc4-select:focus{
  border-color:#7ea5c2;
  box-shadow:0 0 0 3px rgba(47,124,246,.10);
}

/* Buttons */
.isc1__btn,
.isc1__btn:link,
.isc1__btn:visited,
.isc1__navbtn,
.isc1__navbtn:link,
.isc1__navbtn:visited,
.isc2__btn,
#isc3-root .btn,
#isc3-root .btn.nav,
#isc3-root .btn.nav:link,
#isc3-root .btn.nav:visited,
.isc4-topnav-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:42px;
  padding:10px 16px;
  border-radius:12px;
  cursor:pointer;
  font-weight:800;
  line-height:1;
  text-decoration:none;
  transition:transform .15s ease, box-shadow .15s ease, opacity .15s ease, background .15s ease, color .15s ease;
  border:1px solid transparent;
  box-sizing:border-box;
  font-size:14px;
}


#isc3-root .mini,
#isc3-root .btn.mini{
  font-size:13px;
}

.isc1__btn:hover,
.isc1__navbtn:hover,
.isc2__btn:hover,
#isc3-root .btn:hover,
#isc3-root .btn.nav:hover,
.isc4-topnav-btn:hover{
  transform:translateY(-1px);
}

.isc1__btn:active,
.isc1__navbtn:active,
.isc2__btn:active,
#isc3-root .btn:active,
#isc3-root .btn.nav:active,
.isc4-topnav-btn:active{
  transform:translateY(1px);
}
/* ISC1 / ISC2 field breathing */
.isc1__input,
.isc2__input{
  width:100%;
  padding-left:14px;
  padding-right:14px;
}

/* ISC2: restore proper breathing inside the working panel */
.isc2__card.calc-panel,
.calc-panel.isc2__card{
  padding:20px 22px 18px;
}

.isc2__grid{
  margin-top:16px;
  gap:12px 14px;
}

.isc2__actions.calc-actions,
.calc-actions.isc2__actions{
  margin-top:16px;
  gap:10px;
}

@media (max-width: 720px){
  .isc2__card.calc-panel,
  .calc-panel.isc2__card{
    padding:16px 16px 14px;
  }

  .isc2__actions.calc-actions,
  .calc-actions.isc2__actions{
    margin-top:14px;
  }
}


/* ISC4 top navigation buttons: readable white text */
.isc4-topnav-btn,
.isc4-topnav-btn:link,
.isc4-topnav-btn:visited,
.isc4-topnav-btn:hover,
.isc4-topnav-btn:focus-visible{
  color:#ffffff;
}


/* ===== InvestScaner calculator components ===== */

.calc-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:16px;
}

#isc3-root .grid > .card .hd{
  padding:16px 18px 14px 18px;
}

#isc3-root .grid > .card .bd{
  padding:18px;
}

#isc3-root .card .hd .title{
  font-size:18px;
  font-weight:700;
  color:#243443;
  line-height:1.2;
}

#isc3-root .card .hd .hint,
#isc3-root .muted,
#isc3-root .small,
#isc3-root p,
#isc3-root .kpi .box .l,
#isc3-root .badge,
#isc3-root th,
#isc3-root .list li,
#isc3-root .list,
#isc3-root td{
  font-size:13px;
  line-height:1.35;
}

#isc3-root .muted,
#isc3-root .card .hd .hint,
#isc3-root .kpi .box .l,
#isc3-root p,
#isc3-root th{
  color:#4e6474;
}

#isc3-root p{
  margin:8px 0 0;
}

#isc3-root .pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 12px;
  border-radius:999px;
  font-size:12px;
  font-weight:900;
  line-height:1;
  background:#f4f4f4;
  color:#111;
  border:1px solid transparent;
  box-shadow:none;
}

#isc3-root .pill b{
  font-weight:900;
}

#isc3-root .pill .muted{
  color:inherit;
}

#isc3-root .badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 12px;
  border-radius:999px;
  border:1px solid rgba(214,225,242,.95);
  background:rgba(255,255,255,.9);
  font-size:12px;
  font-weight:900;
}

.status-pill.status-conservative{
  background:#29b6f6;
  border-color:#29b6f6;
  color:#fff;
}

.status-pill.status-conservative .muted{
  color:rgba(255,255,255,.92);
}

.status-pill.status-balanced{
  background:#22c55e;
  border-color:#22c55e;
  color:#fff;
}

.status-pill.status-balanced .muted{
  color:rgba(255,255,255,.92);
}

.status-pill.status-aggressive{
  background:#ef4444;
  border-color:#ef4444;
  color:#fff;
}

.status-pill.status-aggressive .muted{
  color:rgba(255,255,255,.92);
}

.risk-pill.risk-good{
  background:#22c55e;
  border-color:#22c55e;
  color:#fff;
}

.risk-pill.risk-good .muted{
  color:rgba(255,255,255,.92);
}

.risk-pill.risk-warn{
  background:#f59f1a;
  border-color:#f59f1a;
  color:#fff;
}

.risk-pill.risk-warn .muted{
  color:rgba(255,255,255,.92);
}

.risk-pill.risk-bad{
  background:#ef4444;
  border-color:#ef4444;
  color:#fff;
}

.risk-pill.risk-bad .muted{
  color:rgba(255,255,255,.92);
}

@media (max-width: 720px){
  #isc3-root .grid > .card .hd,
  #isc3-root .grid > .card .bd{
    padding-left:16px;
    padding-right:16px;
  }
}

/* ===== InvestScaner ISC4 components ===== */

.isc4-topnav{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin-bottom:14px;
  padding-bottom:12px;
  border-bottom:1px solid #e3ebf1;
  flex-wrap:wrap;
}

.isc4-topnav-center{
  flex:1 1 320px;
  text-align:center;
}

.isc4-topnav-title{
  font-size:19px;
  font-weight:700;
  color:#13293d;
  line-height:1.2;
}

.isc4-topnav-sub{
  margin-top:6px;
  font-size:12px;
  font-weight:700;
  color:#586d7c;
  line-height:1.35;
  text-transform:uppercase;
}

.isc4-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:14px;
  flex-wrap:wrap;
  margin-bottom:16px;
}

.isc4-subtitle{
  font-size:14px;
  color:#607282;
  line-height:1.45;
}

.isc4-counter{
  padding:10px 14px;
  border-radius:14px;
  background:#edf3f7;
  color:#31414f;
  font-size:14px;
  white-space:nowrap;
}

.isc4-import-card{
  margin:0 0 16px;
  padding:18px;
  border:1px solid #d7e2ea;
  border-radius:16px;
  background:#eef6ff;
}

.isc4-import-title{
  font-size:20px;
  font-weight:700;
  margin-bottom:8px;
  color:#203040;
}

.isc4-import-text{
  font-size:15px;
  line-height:1.5;
  color:#4d5f6e;
  margin-bottom:8px;
}

.isc4-import-meta{
  font-size:13px;
  color:#6f8290;
  margin-bottom:12px;
}

.isc4-panel,
.isc4-block{
  margin-bottom:16px;
  padding:16px;
  border:1px solid #dde6ed;
  border-radius:16px;
  background:#ffffff;
}

.isc4-block-title{
  font-size:18px;
  font-weight:700;
  margin-bottom:14px;
  color:#243443;
}

.isc4-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.isc4-btn{
  border:none;
  border-radius:12px;
  padding:11px 16px;
  font-size:14px;
  font-weight:700;
  cursor:pointer;
  transition:transform .15s ease, opacity .15s ease;
}

.isc4-btn:hover{
  transform:translateY(-1px);
  opacity:.97;
}

.isc4-btn-primary{
  background:#2f7cf6;
  color:#fff;
}

.isc4-btn-secondary{
  background:#e8eef3;
  color:#31414f;
}

.isc4-btn-danger{
  background:#a72e3d;
  color:#fff;
}

.isc4-btn-full{
  width:100%;
}

@media (max-width: 720px){
  .isc4-topnav{
    flex-direction:column;
    align-items:stretch;
    gap:10px;
    margin-bottom:12px;
    padding-bottom:10px;
  }

  .isc4-topnav-center{
    order:-1;
    flex:0 0 auto;
    text-align:left;
  }

  .isc4-topnav-title{
    font-size:18px;
    font-weight:700;
    line-height:1.15;
    margin:0;
  }

  .isc4-topnav-sub{
    margin-top:4px;
    font-size:11px;
    line-height:1.3;
  }

  .isc4-topnav-btn{
    width:100%;
    min-height:40px;
    padding:9px 14px;
  }

  .isc4-head{
    gap:10px;
    margin-bottom:14px;
  }

  .isc4-field-filter{
    flex:1 1 100%;
  }
}

/* ISC4 top navigation buttons */
.isc4-topnav-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:42px;
  padding:10px 16px;
  border:none;
  border-radius:12px;
  font-size:14px;
  font-weight:700;
  line-height:1.2;
  color:#fff;
  text-decoration:none;
  cursor:pointer;
  transition:transform .15s ease, opacity .15s ease;
}

.isc4-topnav-btn:hover{
  transform:translateY(-1px);
  opacity:.97;
  color:#fff;
  text-decoration:none;
}

.isc4-topnav-btn:visited{
  color:#fff;
}

.isc4-topnav-btn--prev{
  background:#8b5cf6;
}

.isc4-topnav-btn--next{
  background:#2563eb;
}
