html, body {
    margin: 0;
}
  body {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.7;
}
h1, h2, h3 {
  font-weight: 600;
  font-family: 'Rubik', sans-serif;
}


h1, h2, h3, h4 { font-family: 'Rubik', sans-serif; }
.dark-mode { background: linear-gradient(to bottom right, #2d2d2d, #1a1a1a); color: #e0e0e0; }
.dark-mode table { background-color: #2b2b2b; }
.circle-bg {
position: absolute; width: 400px; height: 400px; border-radius: 50%;
background: rgba(255, 255, 255, 0.2); animation: float 20s infinite alternate;
}
@keyframes float {
0% { transform: translate(0, 0); }
100% { transform: translate(100px, 50px); }
}
.title {
  font-size: 24px;
  font-weight: bold;
  /*margin-bottom: 10px;*/
}
.header {
  font-size: 16px;
  margin-bottom: 20px;
}
.code-example {
  text-align: left;
}
.input-box{
  width: 90vh;
  height: 30vh;
  padding: 10px;
  margin-bottom: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
  resize: none;
  overflow-y: auto;
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
}
select{
  padding: 10px;
  margin-bottom: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
  resize: none;
  overflow-y: auto;
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
}
#invoiceModal {
    display: none;
}
#invoiceModal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  /*z-index: 9999;*/
  background: white;
  padding: 20px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.6);
}
#editor {
  float: left;
  width: 80%;
}


#toolbar div {
  cursor: pointer;
  color: blue;
  display: inline-block;
}
/*
.modal-container {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}*/

#qrcode {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: white;
  padding: 20px;
  border-radius: 5px;
}
#toolbar{
    text-align: right;
    float: right;
}




.buttonlink {
  background: none!important;
  border: none;
  padding: 0!important;
  /*optional*/
  font-family: arial, sans-serif;
  /*input has OS specific font-family*/
  color: #069;
  text-decoration: underline;
  cursor: pointer;
}
code-input {
  width: calc(100% - 40px); /* 100% - 2*margin */
  --padding: 20px;
}
/*
code-input{
    height: 30em;
}

#container{
    width: 30em;
    height: 30em;
    }
pre{
    width: 30em;
    height: 30em;
}
*/
.is-open{
    z-index: 99999;
}
#run-report{
    font-size: xx-small;
}
table {
  width: 100%;
  table-layout: fixed;
  font-size: xx-small;
}
td.hash{
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;

}

a{
    text-decoration: none;
}

/*-----------collapsible section begin-------------*/
/*https://jordanfinners.dev/blogs/creating-a-collapsible-section-with-nothing-but-html/*/
details {
  user-select: none;
}

details>summary span.icon {
  width: 24px;
  height: 24px;
  transition: all 0.3s;
  margin-left: auto;
}

details[open] summary span.icon {
  transform: rotate(180deg);
}

summary {
  display: flex;
  cursor: pointer;
}

summary::-webkit-details-marker {
  display: none;
}

/*-----------collapsible section end-------------*/
html, body {
  height: 100%;
  margin: 0;
}

#content {
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Instead of overriding Pure globally, do it only in that section */
#execution-tab .pure-g { height: 100%; }
#execution-tab .pure-u-1 {
  height: 100%;
  display: flex;
  flex-direction: column;
  flex: 1;
}

#damageTextArea {
  flex: 1;
  width: 100%;
  resize: none;
  box-sizing: border-box;
}


.buttonlink {
  display: inline-block;
  margin-top: 8px;
  margin-right: 12px;
  padding: 6px 14px;
  font-size: 14px;
  font-weight: 500;
  color: #007BFF;
  background-color: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.2s ease-in-out;
}

.buttonlink:hover,
.buttonlink:focus {
  color: #0056b3;
  text-decoration: underline;
  outline: none;
}



/*
.modal__header img {
  max-width: 120px;
  height: auto;
  display: block;
  margin: 2rem auto 1rem auto;
}
.modal__header {
  text-align: center;
  padding: 2rem 1rem 0 1rem;
}

*/

.styled-btn {
  background: linear-gradient(to right, #0052cc, #007bff);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  width: 100%;
  box-shadow: 0 4px 10px rgba(0, 82, 204, 0.2);
  cursor: pointer;
  transition: all 0.25s ease-in-out;
  margin-top: 1rem;
}

.styled-btn:hover {
  background: linear-gradient(to right, #003fa6, #005ec4);
  transform: scale(1.02);
}
#balanceDiv {
  cursor: pointer;
  border: 1px solid #555;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  background-color: rgba(0, 123, 255, 0.1);
  transition: all 0.2s ease-in-out;
}

#balanceDiv:hover {
  background-color: rgba(0, 123, 255, 0.2);
}
.balance-column {
  display: flex;
  flex-direction: column;
  align-items: flex-start; /* keeps it left-aligned */
  gap: 0.25rem;
}

#balanceAddress {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font: 600 .85rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color: #e6eefc;
  background: rgba(0,123,255,.12);
  border: 1px solid rgba(0,123,255,.35);
  border-radius: 6px;
  padding: .25rem .5rem;
  vertical-align: middle;
}

.balance-row {
  display: flex;
  align-items: center;
  gap: .5rem;
}


#toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  align-items: center;
}
#damageTextArea {
  padding: 1rem;
  border-radius: 6px;
  background-color: #1a1a1a;
  color: #eee;
  font-family: monospace;
  box-shadow: inset 0 0 5px rgba(255,255,255,0.1);
}
.styled-btn:hover {
  background: linear-gradient(to right, #003fa6, #005ec4);
  transform: scale(1.02);
  box-shadow: 0 0 10px rgba(0, 123, 255, 0.4);
}
#runreports {
  padding: 1rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: #ccc;
  font-family: monospace;
}
/* === Modal Container Cleanup === */
.modal__container {
  background: #1e1e2f;
  color: #eaeaea;
  border-radius: 12px;
  padding: 2rem;
  max-width: 540px;
  margin: auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

/* === Modal Header and Title === */
.modal__header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.modal__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
}

/* === Tab Links === */
[data-token-tabs] {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  justify-content: center;
  border-bottom: 1px solid #444;
  padding-bottom: 0.5rem;
}

[data-token-tabs] a {
  color: #00bfff;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-weight: 500;
  background-color: #2a2a3d;
}

[data-token-tabs] a:hover,
[data-token-tabs] a[data-tabby-default] {
  background-color: #007bff;
  color: white;
}


* === Form Buttons === */
#damage-transfer-out-btn,
#generate-invoice-btn,
.modal__btn {
  background: linear-gradient(to right, #0052cc, #007bff);
  border: none;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-size: 1rem;
  color: white;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  margin-top: 0.75rem;
  transition: all 0.2s ease-in-out;
}

#damage-transfer-out-btn:hover,
#generate-invoice-btn:hover,
.modal__btn:hover {
  background: linear-gradient(to right, #003fa6, #005ec4);
  transform: scale(1.02);
}

/* === Copy Icon === */
#copyAddressIcon,
#copyInvoiceIcon {
  color: #ffcc00;
  margin-left: 0.5rem;
}

#copyAddressIcon:hover,
#copyInvoiceIcon:hover {
  color: #ffffff;
}

/* === QR Code Box === */
#qrcode-damage,
#qrcode-lightning {
  margin: 1rem 0;
  text-align: center;
  background-color: #2a2a3d;
  padding: 1rem;
  border-radius: 6px;
}

/* === Invoice Detail Expand === */
details {
  margin-top: 1rem;
  background-color: #2a2a3d;
  padding: 0.75rem;
  border-radius: 6px;
  color: #ddd;
}

summary {
  font-weight: 600;
  cursor: pointer;
}

textarea#lightning-invoice-input {
  font-family: monospace;
  font-size: 0.85rem;
  resize: none;
  background-color: #1a1a1a;
  color: #eee;
  padding: 1rem;
  border-radius: 6px;
  border: none;
}
/* Center the QR code image inside modal */
#qrcode-damage,
#qrcode-lightning {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  background-color: #2a2a3d;
  border-radius: 6px;
  margin: 1rem auto;
  max-width: 300px;
}

/* Fix img inside QR div to avoid double alignment issues */
#qrcode-damage img,
#qrcode-lightning img {
  display: block;
  margin: auto;
}


/* Close (X) button styling */
.modal__close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #aaa;
  /*
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
*/
  cursor: pointer;
  transition: color 0.2s ease-in-out;
}

.modal__close:hover {
  color: #fff;
}

/* Input field dark styling */
.modal__content {
  background-color: #1c1c2b;
  color: #f5f5f5;
  /*
  border-radius: 6px;
  padding: 0.6rem 0.75rem;
  width: 90%;
  margin-top: 0.5rem;
  margin-bottom: 0.75rem;
  margin-left: 0.5rem;
  margin-right: 0.5rem;
  font-size: 0.95rem;
*/
}

/* Tabs container */
ul[data-tabs] {
  display: flex;
  border-bottom: 2px solid #3a3a3a;
  padding: 0;
  gap: 0.5rem;
  justify-content: flex-start;
  background-color: #1e1e2f;
  padding-left: 1rem;
  padding-top:0.5rem;
}

/* Tab links */
ul[data-tabs] li a {
  display: inline-block;
  padding: 0.75rem 1.25rem;
  border-radius: 6px 6px 0 0;
  background-color: #2a2a3d;
  color: #ccc;
  font-weight: 500;
  transition: background 0.3s, color 0.3s;
  border: 1px solid #2f2f2f;
  border-bottom: none;
  text-decoration: none;
}

/* Active tab */
ul[data-tabs] li a[data-tabby-default],
ul[data-tabs] li a[aria-selected="true"] {
  background-color: #007bff;
  color: #fff;
  border-color: #007bff;
  font-weight: 600;
}

/* Hover state */
ul[data-tabs] li a:hover {
  background-color: #44475a;
  color: #fff;
}

/* Panel styling (like #execution-tab, #history-tab) */
.execute-container,
#history-tab,
#analytics-tab,
#schedules-tab,
#settings-tab {
  background-color: #252535;
  border-radius: 0 0 10px 10px;
  border: 1px solid #3a3a3a;
  border-top: none;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

#run-reports-panel {
    margin-left:0.5rem;
  padding: 1rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: #ccc;
  font-family: monospace;
}

/* Generic wrapper for both input and textarea */
.click-copy {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

/* Shared styling for input and textarea */
.click-copy input[type="text"],
.click-copy textarea[readonly] {
  width: 100%;
  padding: 0.75rem 2.5rem 0.75rem 1rem;
  border: 1px solid #444;
  border-radius: 6px;
  background-color: #1c1c2b;
  color: #e0e0e0;
  font-size: 0.95rem;
  font-family: monospace;
  resize: none;
  outline: none;
}

/* Adjust for taller textareas */
.click-copy textarea {
  min-height: 5rem;
  line-height: 1.5;
}

/* The copy icon */
.click-copy .copy-icon {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  color: #ffcc00;
  cursor: pointer;
  transition: color 0.2s ease-in-out;
}

.click-copy .copy-icon:hover {
  color: #ffffff;
}
/* Header container */
.site-header {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Logo image */
.logo {
  width: 58px;
  /*height: 48px;*/
  object-fit: contain;
  filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.4));
}

/* Text styling next to logo */
.brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.brand-text .title {
  font-size: 1.6rem;
  font-weight: 700;
  color: #00bfff;
}

.brand-text .subtitle {
  font-size: 0.95rem;
  color: #aaa;
  margin-top: 0.2rem;
}
.site-header {
  background: linear-gradient(to right, #1f2a3a, #141e30);
  padding: 0.5rem 1.7rem;
  border-radius: 8px;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.3);
}
/* Combine site-header and toolbar into a single topbar container */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(to right, #1f2a3a, #141e30);
  padding: 0.45rem 0.7rem;
  border-bottom: 1px solid #333;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Move existing .site-header into left section */
.topbar .site-header {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Move existing #toolbar items into right section */
.topbar .toolbar-items {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.toolbar-items div {
  color: #ccc;
  font-weight: 500;
  cursor: pointer;
}

.toolbar-items div:hover {
  color: #fff;
}
/* Make the topbar Install button look obviously clickable */
.install-btn {
  background: linear-gradient(to right, #28a745, #218838);
  color: #fff;
  padding: 10px 16px;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s ease-in-out;
  user-select: none;
}
.install-btn:hover { transform: scale(1.03); }

/* Uniform inputs/selects inside the install wizard */
#install-modal input, #install-modal select, #install-modal textarea {
  width: 100%;
  padding: 10px;
  border-radius: 6px;
  margin-top: 6px;
}
#installRequestForm label {
  display: block;
  margin: .5rem 0 .25rem;
  font-weight: 500;
}

/* Wallet selector: dark theme + hover/focus states */
#walletSelectorWrap { display:inline-flex; align-items:center; gap:.5rem; }
#walletSelector{
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #2f2f2f;
  background: #1e1e2f;
  color: #e6eefc;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 0 0 rgba(0,0,0,0);
  transition: box-shadow .15s ease, border-color .15s ease, background .15s ease;
}
.topbar #walletSelector:hover { background:#25253a; }
.topbar #walletSelector:focus-visible{
  outline: none;
  border-color:#007bff;
  box-shadow: 0 0 0 3px rgba(0,123,255,.25);
}
#balanceLabel{ color:#9fc9ff; margin-right:.4rem; font-weight:600; font-size:.95rem; }
#balanceAmount{ font-weight:700; font-family:monospace; }

/* Emphasize DAMAGE, add subtle AE subtext */
#balanceDiv {
  cursor: pointer;
  border: 1px solid #555;
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  background-color: rgba(0, 123, 255, 0.1);
  transition: all 0.2s ease-in-out;
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
 position: relative;
}
#balanceDiv:hover { background-color: rgba(0, 123, 255, 0.2); }

.balance-row { display: inline-flex; align-items: baseline; gap: .5rem; }
#balanceLabel { color:#9fc9ff; font-weight:600; font-size:.95rem; }
/* balance refresh button */
#balanceRefreshBtn {
  appearance: none;
  border: 0;
  background: none;
  width: 22px; height: 22px;
  border-radius: 9999px;
  display: inline-flex; align-items: center; justify-content: center;
  font: 600 13px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  opacity: .8; cursor: pointer; margin-left: .25rem;
}
#balanceRefreshBtn:hover { opacity: 1; }
#balanceRefreshBtn[aria-busy="true"] { animation: balance-spin .9s linear infinite; }

@keyframes balance-spin { from { transform: rotate(0); } to { transform: rotate(360deg); } }

/* keep rows tidy when the button is appended */
#balanceDiv .balance-row { align-items: center; gap: .45rem; }

#balanceTopupBtn {
  appearance: none;
  border: 0;
  background: none;
  width: 22px;
  height: 22px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: 600 13px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  opacity: .8;
  cursor: pointer;
  margin-left: .25rem;
}
#balanceTopupBtn:hover { opacity: 1; }



.damage-amount { font-weight:800; font-family:monospace; font-size:1.05rem; letter-spacing:.3px; }

.ae-sub {
  font-size: .78rem;
  line-height: 1.2;
  color: #a9b3c7;
  opacity: .9;
}
/* Fix the invalid comment so the rest of CSS parses */
 /* === Form Buttons === */

/* Restore Pure grid behavior inside the installer */
#install-modal .pure-g { height: auto; }
#install-modal .pure-u-1,
#install-modal .pure-u-md-1-2,
#install-modal .pure-u-md-1-3 {
  display: inline-block;   /* Pure expects inline-block */
  height: auto;
  flex: none;
  vertical-align: top;
}

/* Keep the fieldset neatly contained */
#install-modal fieldset { box-sizing: border-box; margin: 0; min-width: 0; }

/* Long commands shouldn’t push layout */
#install-modal pre { white-space: pre-wrap; word-break: break-word; }
#install-modal .styled-btn { box-sizing: border-box; width: 100%; }
#install-modal .install-form pre {
  box-sizing: border-box; margin:.75rem 0; padding:.75rem 1rem;
  max-width:100%; max-height:40vh; overflow:auto;
  white-space:pre-wrap; word-break:break-word; overflow-wrap:anywhere;
  color:var(--fg,#eaeaea); background:var(--code-bg,rgba(8,12,20,.88));
  border:1px solid rgba(255,255,255,.12); border-radius:10px;
  font:.9rem/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}
#install-modal pre code { display:block; color:inherit; background:transparent; user-select:text; }
#install-modal pre + .styled-btn { margin-top:.5rem; width:100%; box-sizing:border-box; }
#install-modal .install-form .pure-g.quick-dl {
  display: grid;
  grid-template-columns: 1fr;
  gap: .5rem;
}
@media (min-width: 720px) {
  #install-modal .install-form .pure-g.quick-dl {
    grid-template-columns: repeat(3, 1fr);
  }
}
#install-modal .install-form .styled-btn[download] {
  width: 100%;
  text-align: center;
}

/* 1) Stop leaking z-index to everything */
.modal.is-open { z-index: 100000; }
