/* Minta layout on top of the ws theme (ws.css): colours and fonts come from its tokens. */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-primary);
}
.status-bar {
    width: 100%;
    background: var(--surface-050);
    border-bottom: 1px solid var(--surface-075);
    display: flex;
    justify-content: center;
    gap: 3rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.85rem;
    flex-shrink: 0;
}
.status-item {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.status-label {
    color: var(--text-muted);
}
.status-value {
    color: var(--text-primary);
    font-weight: 500;
}
.status-loading {
    color: var(--text-muted);
}
.paused-indicator {
    color: var(--warning);
    font-weight: 500;
}
.block-ring {
    transform: rotate(-90deg);
}
.block-ring-bg {
    fill: none;
    stroke: var(--surface-600);
    stroke-width: 3;
}
.block-ring-fill {
    fill: none;
    stroke: var(--ws-green);
    stroke-width: 3;
    stroke-dasharray: 50.27;
    stroke-dashoffset: 50.27;
    stroke-linecap: round;
    animation: ring-fill 5.26s linear forwards;
}
@keyframes ring-fill {
    to { stroke-dashoffset: 0; }
}
.mining-control {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
}
.mining-icon {
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: color 0.15s;
    user-select: none;
}
.mining-icon:hover {
    color: var(--text-primary);
}
.container {
    max-width: 550px;
    width: 100%;
    margin-top: auto;
    margin-bottom: auto;
    padding: 1rem;
    position: relative;
    top: -5vh;
}
.card {
    background: var(--surface-100);
    border: 1px solid var(--surface-500);
    border-radius: var(--radius-8);
    padding: 1rem 1.25rem;
}
.section-header {
    color: var(--ws-green);
    font-size: 0.95rem;
    font-weight: 500;
    margin: 1rem 0 0.5rem;
}
.section-header:first-child {
    margin-top: 0.25rem;
}
.row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}
.row-label {
    color: var(--text-card);
    font-size: 0.875rem;
    white-space: nowrap;
}
input[type="text"],
select,
textarea {
    padding: 0.4rem 0.75rem;
    background: var(--surface-250);
    border: 1px solid var(--surface-600);
    border-radius: var(--radius-4);
    font-family: inherit;
    font-size: 0.875rem;
    color: var(--text-primary);
}
input[type="text"],
select {
    flex: 1;
    min-width: 0;
}
select {
    min-width: 6rem;
    cursor: pointer;
}
select option {
    background: var(--surface-250);
    color: var(--text-primary);
}
textarea {
    width: 100%;
    resize: vertical;
}
input[type="text"]::placeholder,
textarea::placeholder {
    color: var(--text-muted);
}
input[type="text"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--ws-green);
}
button {
    width: auto;
    padding: 0.4rem 1rem;
    background-color: var(--surface-700);
    background-image: var(--ws-gradient);
    color: var(--text-on-light);
    border: none;
    border-radius: var(--radius-2);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}
button:hover:not(:disabled) {
    background-image: none;
    background-color: var(--light-blue);
}
button:disabled {
    background-image: none;
    background-color: var(--surface-500);
    color: var(--text-disabled);
    cursor: not-allowed;
}
button.danger {
    background-image: none;
    background-color: #e24e1b;
    color: var(--text-primary);
}
button.danger:hover:not(:disabled) {
    background-color: #e24e1b;
    opacity: 0.85;
}
.console,
.mempool {
    background: var(--surface-000);
    border: 1px solid var(--surface-500);
    border-radius: var(--radius-4);
    padding: 0.5rem 0.75rem;
    overflow-y: auto;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    line-height: 1.2;
}
.console {
    height: 8.5rem;
}
.mempool {
    max-height: 10rem;
}
.console-entry {
    margin-bottom: 0.25rem;
    color: var(--text-article);
}
.console-entry:last-child {
    margin-bottom: 0;
}
.result-inline {
    margin-top: 0.25rem;
    padding: 0.3rem 0.75rem;
    background: rgba(95, 231, 228, 0.1);
    color: var(--ws-green);
    border: 1px solid rgba(95, 231, 228, 0.3);
    border-radius: var(--radius-4);
    font-size: 0.8rem;
    word-break: break-all;
    font-family: var(--font-mono);
}
.mempool-empty {
    color: var(--text-muted);
}
.mempool-tx {
    display: flex;
    gap: 1rem;
    padding: 0.2rem 0;
    color: var(--text-article);
    cursor: pointer;
    transition: background 0.1s;
}
.mempool-tx:hover {
    background: var(--surface-250);
}
.mempool-txid {
    color: var(--text-primary);
    flex: 1;
}
.mempool-detail {
    color: var(--text-card);
    white-space: nowrap;
}
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.modal-card {
    background: var(--surface-100);
    border: 1px solid var(--surface-500);
    border-radius: var(--radius-8);
    padding: 1.25rem;
    max-width: 900px;
    width: 95%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}
.modal-close {
    position: absolute;
    top: 0.75rem;
    right: 1rem;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.2rem;
    transition: color 0.15s;
    user-select: none;
}
.modal-close:hover {
    color: var(--text-primary);
}
.modal-header {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-article);
    margin-bottom: 1rem;
    word-break: break-all;
}
.modal-header .txid-full {
    color: var(--ws-green);
    font-weight: 500;
}
.tx-details {
    display: grid;
    grid-template-columns: auto 1fr auto 1fr;
    gap: 0.3rem 1rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--surface-500);
    font-family: var(--font-mono);
    font-size: 0.75rem;
}
.tx-detail-label {
    color: var(--text-muted);
    white-space: nowrap;
}
.tx-detail-value {
    color: var(--text-article);
}
.modal-section {
    color: var(--ws-green);
    font-size: 0.85rem;
    font-weight: 500;
    margin: 0.75rem 0 0.4rem;
}
.modal-columns {
    display: flex;
    gap: 1rem;
}
.modal-col {
    flex: 1;
    min-width: 0;
    overflow-y: auto;
    max-height: 50vh;
}
.io-card {
    background: var(--surface-000);
    border: 1px solid var(--surface-500);
    border-radius: var(--radius-4);
    padding: 0.35rem 0.6rem;
    margin-bottom: 0.3rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}
.io-card.clickable {
    cursor: pointer;
    transition: border-color 0.1s;
}
.io-card.clickable:hover {
    border-color: var(--ws-green);
}
.io-card.highlighted {
    background: rgba(95, 231, 228, 0.08);
    border-color: rgba(95, 231, 228, 0.5);
}
.io-card-top {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}
.io-card-bottom {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    gap: 0.4rem;
}
.io-idx {
    color: var(--text-muted);
    flex-shrink: 0;
}
.io-main {
    color: var(--text-article);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.io-amt {
    color: var(--text-primary);
    font-weight: 500;
    flex-shrink: 0;
    white-space: nowrap;
}
.io-badge {
    font-size: 0.65rem;
    padding: 0.1rem 0.4rem;
    border-radius: var(--radius-2);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--surface-150);
}
.io-badge.unspent {
    color: var(--ws-green);
}
.io-badge.spent {
    color: #e24e1b;
}
.io-badge.op-return {
    color: var(--text-muted);
}
.io-badge.coinbase {
    color: var(--warning);
}
.io-badge.script-type {
    color: var(--link);
}
