/* =========================================================
   Tor Miner Modal Styling
   ========================================================= */

/* --- Trigger Button --- */
#minerTrigger {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin: 0;
    display: inline-block;
    transition: transform 0.2s ease;
}
#minerTrigger:hover { transform: scale(1.05); }

/* --- Modal Overlay --- */
#minerModal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 99999;
    justify-content: center;
    align-items: center;
    animation: minerFadeIn 0.25s ease-out;
}

/* --- Modal Box --- */
#minerModal > div {
    background: #1e1e1e;
    width: 90%; max-width: 420px;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9);
    border: 1px solid #333;
    color: #e0e0e0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow: hidden;
}

/* --- Body --- */
#minerModal .miner-body { padding: 24px; }

/* --- Rows --- */
#minerModal .miner-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}
#minerModal .miner-row + .miner-row {
    border-top: 1px solid #2a2a2a;
    margin-top: 8px;
}
#minerModal .miner-label { color: #aaa; font-size: 14px; }
#minerModal .miner-value { color: #fff; font-weight: 500; font-size: 14px; }
#miner-status { color: #ff9900; font-weight: 500; font-size: 14px; }

/* --- Status Group with Spinner --- */
#minerModal .miner-status-group {
    display: flex;
    align-items: center;
    gap: 10px;
}
#minerSpinner {
    display: none;
    width: 16px; height: 16px;
    border: 2px solid #444;
    border-top: 2px solid #ff9900;
    border-radius: 50%;
    animation: minerSpin 0.8s linear infinite;
}

/* --- Toggle Switch --- */
.miner-toggle-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #2a2a2a;
    margin-top: 12px; padding-top: 12px;
}
.miner-toggle-wrap .miner-label { font-size: 14px; color: #aaa; }
.switch {
    position: relative;
    display: inline-block;
    width: 40px; height: 20px;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #444;
    transition: .4s;
    border-radius: 20px;
}
.slider:before {
    position: absolute; content: "";
    height: 16px; width: 16px;
    left: 2px; bottom: 2px;
    background-color: white;
    transition: .4s; border-radius: 50%;
}
input:checked + .slider { background-color: #ff9900; }
input:checked + .slider:before { transform: translateX(20px); }

/* --- Annotation --- */
.miner-annotation {
    color: #888;
    font-size: 11px;
    line-height: 1.5;
    margin-top: 10px;
    padding: 10px 0 0 0;
    border-top: 1px solid #2a2a2a;
    text-align: left;
}

/* --- Footer --- */
#minerModal .miner-footer {
    padding: 16px 24px;
    background: #161616;
    border-top: 1px solid #2a2a2a;
    display: flex; justify-content: flex-end;
}
#minerModal .miner-footer-btn {
    background: transparent; color: #888;
    border: 1px solid #444; padding: 8px 20px;
    border-radius: 8px; cursor: pointer; font-size: 13px;
    transition: all 0.2s;
}
#minerModal .miner-footer-btn:hover { border-color: #666; color: #fff; }

/* --- Animations --- */
@keyframes minerFadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}
@keyframes minerSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- Responsive --- */
@media (max-width: 480px) {
    #minerModal > div { width: 95%; max-width: 100%; }
    #minerModal .miner-body { padding: 16px; }
    .miner-annotation { font-size: 10px; }
}
