/* TidePool Poolstats - Classic Theme
 *
 * Reproduces the original miningstats centered-card layout.
 * Per-chain colors loaded from CDN theme.css override the CSS custom properties.
 * Default palette is neutral grayscale so the CDN theme swap is subtle.
 *
 * Brand colors from old TidePoolStats themes:
 *   Bitcoin:  #f7931a (orange/gold)  bg: #d6d0c5  shadow: #000
 *   Zetacoin: #428bca (blue)         bg: #EFEFEF  shadow: #808080
 *   Litecoin: #858585 (silver)       bg: #bfbfbf  shadow: #858585
 */

:root {
    --ps-bg: #e8e8e8;
    --ps-card-bg: white;
    --ps-card-radius: 50px;
    --ps-card-shadow: 15px 15px 1px #999999;
    --ps-card-width: 550px;
    --ps-accent: #666666;
    --ps-accent-light: #888888;
    --ps-accent-muted: #555555;
    --ps-text: #000000;
    --ps-muted: #363635;
    --ps-success: #008000;
    --ps-danger: #ff0000;
    --ps-info: #0000ff;
}

/* Base */
body {
    color: var(--ps-text);
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.42857;
    background: var(--ps-bg);
    margin: 0;
    padding: 0;
}

/* Centered layout */
#outer-holder {
    margin-left: auto;
    margin-right: auto;
    margin-top: 40px;
    text-align: center;
    padding: 0 15px;
}

/* Card */
#holder {
    border-radius: var(--ps-card-radius);
    background-color: var(--ps-card-bg);
    margin-left: auto;
    margin-right: auto;
    margin-top: 20px;
    padding: 20px;
    max-width: var(--ps-card-width);
    box-shadow: var(--ps-card-shadow);
    transition: max-width 0.3s ease;
}

/* Card header (logo + tagline) */
#card-header {
    text-align: center;
}

/* Chain tagline */
#chain-tagline {
    font-size: 18px;
    margin: 10px 0 0 0;
}

/* Chain logo - home view: centered, large */
#chain-logo {
    max-width: 350px;
    height: auto;
    margin: 10px auto;
    display: block;
    transition: max-width 0.3s ease;
}

/* Wide views: small logo, top-right */
#holder.wide {
    max-width: 900px;
    position: relative;
}

#holder.wide #card-header {
    position: absolute;
    top: 20px;
    right: 20px;
    text-align: right;
    z-index: 1;
}

/* Logo link: only show pointer on wide views */
#card-header a {
    pointer-events: none;
    cursor: default;
}

#holder.wide #card-header a {
    pointer-events: auto;
    cursor: pointer;
}

#holder.wide #chain-logo {
    max-width: 60px;
    margin: 0;
}

#holder.wide #chain-tagline {
    display: none;
}

#holder.wide #miner-info {
    min-height: 300px;
    display: flex;
    flex-direction: column;
}

#holder.wide #content {
    flex: 1;
}

#holder.wide hr {
    width: 100%;
    flex-shrink: 0;
}

#holder.wide #stats {
    margin-top: auto;
}

/* Content area */
#miner-info {
    text-align: left;
    font-size: 11px;
}

/* View transition */
#content {
    opacity: 1;
    transition: opacity 0.15s ease;
}

#content.fade-out {
    opacity: 0;
}

/* Stats lookup result transition */
#user-results {
    opacity: 1;
    transition: opacity 0.15s ease;
}

#user-results.fade-out {
    opacity: 0;
}

#miner-info h2 {
    font-size: 16px;
    margin: 10px 0;
}

#miner-info a {
    color: var(--ps-accent-light);
    text-decoration: none;
}

#miner-info a:hover {
    text-decoration: underline;
}

#poolinfo {
    margin: 5px 0;
}

/* Links */
a {
    color: var(--ps-accent-light);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Tables (miners, blocks) */
#miner-info table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
    margin: 10px 0;
}

#miner-info table th {
    text-align: left;
    font-weight: bold;
    padding: 4px 6px;
    border-bottom: 2px solid #ddd;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #555;
}

#miner-info table td {
    padding: 4px 6px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

#miner-info table tr:hover {
    background-color: #f5f5f5;
}

#miner-info table code {
    font-size: 10px;
    background: #f0f0f0;
    padding: 1px 4px;
    border-radius: 3px;
}

/* Scrollable table wrapper */
.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Forms */
#miner-info input[type="text"] {
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 12px;
    width: 100%;
    max-width: 400px;
    box-sizing: border-box;
}

#miner-info input[type="submit"],
#miner-info button {
    padding: 6px 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #f5f5f5;
    font-size: 12px;
    cursor: pointer;
}

#miner-info input[type="submit"]:hover,
#miner-info button:hover {
    background: #e8e8e8;
}

/* Block/payment status */
.pending {
    color: var(--ps-danger);
}

.paid {
    color: var(--ps-success);
}

.donated {
    color: var(--ps-info);
}

.status-confirmed {
    color: var(--ps-success);
    font-weight: bold;
}

.status-pending {
    color: var(--ps-danger);
}

/* Username in lists */
.username {
    color: black;
    font-size: 10px;
    font-weight: bold;
}

/* Stats footer bar (every page) */
#stats {
    text-align: center;
    color: #3d3d3d;
    font-size: 10px;
    margin-top: 10px;
}

#nethash {
    margin-top: 10px;
    color: black;
}

#nethash strong {
    color: var(--ps-accent);
}

/* Notice disclaimer */
#notice {
    margin-top: 30px;
    font-style: italic;
    font-size: 9px;
    color: var(--ps-muted);
}

#notice a {
    color: var(--ps-accent-muted);
}

/* Nav links */
.nav-links {
    margin: 10px 0;
    font-size: 11px;
}

.nav-links a {
    color: var(--ps-accent-light);
    margin: 0 5px;
}

/* Stale data warning */
.stale-warning {
    color: var(--ps-danger);
    font-style: italic;
    font-size: 9px;
    margin-top: 5px;
}

/* Loading states */
[aria-busy="true"] {
    opacity: 0.6;
    font-style: italic;
    font-size: 11px;
}

/* HTMX settling: smooth footer re-renders */
#stats .htmx-settling {
    opacity: 0;
}

#stats [hx-get] {
    transition: opacity 0.15s ease;
}

/* Worker list (stats view) */
.worker-list {
    list-style: none;
    padding: 0;
    margin: 5px 0 10px 0;
}

.worker-list li {
    padding: 3px 0;
    font-size: 11px;
}

.worker-list code {
    font-size: 10px;
    background: #f0f0f0;
    padding: 1px 4px;
    border-radius: 3px;
}

/* Chain selector (landing page at /pools/) */
.chain-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 15px 0;
}

.chain-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 8px;
    text-decoration: none;
    color: var(--ps-text);
    transition: background 0.15s, border-color 0.15s;
}

.chain-card:hover {
    background: #eee;
    border-color: #bbb;
    text-decoration: none;
}

.chain-card-name {
    font-size: 16px;
    font-weight: bold;
}

.chain-card-algo {
    font-size: 11px;
    color: #888;
}

.chain-card-badge {
    margin-left: auto;
    font-size: 10px;
    color: #999;
    font-style: italic;
}

/* Responsive */
@media (max-width: 600px) {
    #holder {
        border-radius: 20px;
        padding: 15px;
        margin-top: 10px;
    }

    #holder.wide {
        max-width: 100%;
    }

    #outer-holder {
        margin-top: 15px;
    }
}
