/* Colors */
:root{
  --pink:#ffd1dc;
  --pink-hover:#ffc0cf;
  --text:#1e0a00;
  --sky:#a7d8f7;
  --muted:#7b665c33;
  --border:#00000010;
  --white:#fff;
}

/* Base */
.hbra, .hashms-wrap{font-family: system-ui, -apple-system, Segoe UI, Roboto, Inter, Arial, sans-serif; color:var(--text);}
.hbra *{box-sizing:border-box}
.hbra{background:#eaf6ff;border-radius:16px;box-shadow:0 2px 10px rgba(0,0,0,.06);padding:14px}
.hbra .muted, .hashms-wrap .muted{opacity:.7}
.hbra a{color:inherit}

.hbra__tabs{display:flex;gap:18px;border-bottom:2px solid var(--muted);padding:6px 6px 0;margin-bottom:12px}
.hbra-tab{background:none;border:none;font-weight:700;padding:12px 8px;border-bottom:3px solid transparent;cursor:pointer}
.hbra-tab.active{border-color:var(--pink)}

.hbra__panel{display:none}
.hbra__panel.active{display:block}

.hbra__row{display:flex;gap:14px;flex-wrap:wrap}
.hbra__field{display:flex;flex-direction:column;gap:6px;min-width:180px;flex:1}
.hbra-input,.hbra-select{width:100%;padding:14px 16px;border-radius:12px;border:1px solid var(--border);background:#fff;box-shadow:inset 0 1px 0 rgba(0,0,0,.02)}
.hbra-input:focus,.hbra-select:focus{outline:none;border-color:var(--pink)}
.hbra-hint{font-size:12px;opacity:.7;margin-top:2px}

.hbra__controls{display:flex;align-items:center;gap:12px;background:#fff3f6;border-radius:16px;padding:14px;margin-top:12px;flex-wrap:wrap}
.hbra-btn{background:var(--pink);border:none;border-radius:12px;padding:12px 18px;font-weight:700;cursor:pointer}
.hbra-btn:hover{background:var(--pink-hover)}
.hbra-link{background:none;border:none;color:var(--text);opacity:.9;text-decoration:underline;cursor:pointer;padding:8px 0}

.hbra-toggle{position:relative;width:90px;height:38px;background:var(--pink);border-radius:999px;display:flex;align-items:center;padding:4px}
.hbra-toggle input{display:none}
.hbra-toggle label{position:relative;width:100%;display:flex;justify-content:space-between;font-weight:700}
.hbra-toggle label span{display:inline-block;width:50%;text-align:center;z-index:2}
.hbra-toggle:after{content:"";position:absolute;left:4px;top:4px;width:40px;height:30px;border-radius:999px;background:#fff;transition:transform .2s ease}
.hbra-toggle input:checked + label ~ .hbra__meta{} /* just to keep selector */
.hbra-toggle input:checked + label + .hbra__meta{}
/* move knob when checked via JS by toggling .is-cm on wrapper */
.hbra.is-cm .hbra-toggle:after{transform:translateX(48px)}

.hbra__meta{display:flex;gap:24px;flex-wrap:wrap;opacity:.8}

.hbra-advanced.hidden{display:none}

.hbra__results{margin-top:10px}
.hbra-tablewrap{overflow:auto;border-radius:12px;border:1px solid var(--border)}
.hbra-table{width:100%;border-collapse:separate;border-spacing:0}
.hbra-table thead th{position:sticky;top:0;background:var(--sky);text-align:left;padding:14px 16px;font-weight:800}
.hbra-table tbody td,.hbra-table tbody th{padding:12px 16px;border-top:1px solid var(--border)}
.hbra-table tbody tr:first-child td,.hbra-table tbody tr:first-child th{border-top:none}
.hbra-flag{margin-right:8px}

/* Admin */
.hashms-wrap{max-width:960px;margin:24px}
.hashms-wrap h1{margin-bottom:6px}
.hashms-wrap .cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px;margin:12px 0}
.hashms-wrap .card{border:1px solid var(--border);border-radius:12px;padding:12px}
.hashms-wrap .card__title{font-weight:700;opacity:.8}
.hashms-wrap .card__big{font-size:34px;font-weight:800}
.hashms-wrap .grid2{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.hashms-wrap label{display:block;margin-top:12px;font-weight:600}
.hashms-wrap input,.hashms-wrap select,.hashms-wrap textarea{width:100%;padding:10px;border:1px solid var(--border);border-radius:8px}
.hashms-wrap textarea{font-family:monospace}
.hashms-wrap .button{margin-top:8px}

/* Responsive */
@media (max-width: 960px){
  .hbra{padding:12px}
  .hbra__row{flex-direction:column}
  .hashms-wrap .grid2{grid-template-columns:1fr}
}


/* Added: tooltip styling and switch row */
.hbra .hbra-tooltip{
  position:absolute;
  z-index:99;
  background:#111;
  color:#fff;
  font-size:12px;
  padding:6px 8px;
  border-radius:6px;
  transform:translateY(-4px);
  white-space:nowrap;
  box-shadow:0 2px 8px rgba(0,0,0,.2);
}
.hbra .hbra-tooltip::after{
  content:"";
  position:absolute;
  left:10px;
  bottom:-5px;
  border:5px solid transparent;
  border-top-color:#111;
}
.hbra .hbra__switchrow{
  display:flex;
  justify-content:flex-end;
  align-items:center;
  margin-bottom:10px;
}
.hbra .hbra-switch-btn{
  margin-left:auto;
}

/* Toggle for 'other countries' */
.hbra__options{margin:12px 0}
.hbra-switch{display:inline-flex;align-items:center;gap:8px;font-size:14px;color:#333}
.hbra-switch input{accent-color:#ff4d6d}

/* Primary button */
.hbra-btn{background:#ff4d6d;color:#fff;border:0;padding:10px 16px;border-radius:12px;font-weight:600;cursor:pointer}
.hbra-btn:hover{filter:brightness(.95)}
.hbra-link{background:none;border:0;color:#ff4d6d;padding:8px 0;cursor:pointer;text-decoration:underline}

/* Row button under basic calc */
.hbra__switchrow{margin-top:8px}
.hbra-switch-btn{display:block;text-align:center;background:#fff1f4;border:1px solid #ff4d6d;color:#ff4d6d;padding:10px 16px;border-radius:12px;font-weight:600}
.hbra-switch-btn:hover{background:#ffe5ec}

/* Card look */
.hbra{background:#fff;border:1px solid #eee;border-radius:16px;box-shadow:0 1px 2px rgba(0,0,0,.03)}
.hbra__row{display:flex;gap:24px;padding:16px 0;border-bottom:1px solid #f0f0f0}
.hbra__field{flex:1;display:flex;flex-direction:column;gap:6px}
.hbra-input{border:1px solid #e8e8e8;border-radius:12px;padding:14px 16px;font-size:16px;outline:none}
.hbra-input:focus{border-color:#ff9bb0;box-shadow:0 0 0 3px rgba(255,155,176,.15)}
.hbra-select{border:1px solid #e8e8e8;border-radius:12px;padding:12px 14px;font-size:16px}

/* Units label under fields */
.hbra-hint{color:#999;font-size:12px;margin-top:4px}

/* Toggle pill */
.hbra-toggle{display:inline-flex;background:#ffd6df;border-radius:28px;padding:6px;gap:6px}
.hbra-toggle button{background:#ffd6df;border:0;border-radius:20px;padding:8px 14px;cursor:pointer}
.hbra-toggle button.active{background:#fff;color:#000;box-shadow:0 1px 0 rgba(0,0,0,.05)}

/* Buttons */
.hbra-btn{background:#ff9bb0;color:#000;border:0;padding:10px 18px;border-radius:14px;font-weight:600}
.hbra-btn:hover{filter:brightness(.97)}

/* Results table header */
.hbra-table thead th{background:#bfe3fa;color:#333;padding:14px 12px;border-top-left-radius:12px;border-top-right-radius:12px}
.hbra-table td, .hbra-table th{padding:14px 12px;border-bottom:1px solid #f5f5f5}
.hbra-tablewrap{border:1px solid #eee;border-radius:16px;overflow:hidden}

/* Error box */
.hbra-error{margin-top:10px;background:#fff3f5;border:1px solid #ffc2cc;color:#b40028;padding:10px 12px;border-radius:10px;font-size:14px}

/* Tabs underline style */
.hbra-tabs{display:flex;gap:24px;border-bottom:1px solid #f0f0f0}
.hbra-tab{background:none;border:0;padding:12px 4px;font-weight:600;cursor:pointer;color:#555}
.hbra-tab.active{color:#000;border-bottom:4px solid #ff9bb0;border-radius:2px}
