/* Mass Refresher — extends existing site styles only */

.main-button-mass {
    width: 100%;
    max-width: 420px;
    margin-top: 1rem;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer !important;
}

#massModal.history-modal .history-modal-content {
    max-width: 680px;
    width: 92%;
}

.mass-modal-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex: 1;
}

.mass-modal-header-row h2 {
    margin: 0;
}

.mass-modal-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mass-modal-header-actions .main-history-button {
    margin-top: 0;
    padding: 6px 14px;
    font-size: 0.75rem;
}

.mass-download-wrap {
    display: none;
    margin-top: 12px;
    text-align: center;
}

.mass-download-wrap.visible {
    display: block;
}

.mass-download-wrap .main-history-button {
    margin-top: 0;
    width: 100%;
    justify-content: center;
}

.mass-running-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 10px;
    height: 10px;
    margin-left: 6px;
    border-radius: 50%;
    background: #22c55e;
    animation: massPulse 1.2s ease infinite;
}

@keyframes massPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.85); }
}

.mass-dropzone {
    border: 2px dashed rgba(67, 175, 255, 0.35);
    border-radius: 5px;
    padding: 14px;
    background: #1a1a1a;
    transition: border-color 0.25s ease, background 0.25s ease;
}

.mass-dropzone.dragover {
    border-color: #43afff;
    background: rgba(67, 175, 255, 0.06);
}

.mass-dropzone-label {
    text-align: center;
    color: #aaa;
    font-size: 0.9rem;
    margin-bottom: 10px;
    user-select: none;
}

.mass-dropzone-label i {
    display: block;
    font-size: 1.6rem;
    color: #43afff;
    margin-bottom: 6px;
}

.mass-textarea.main-input {
    min-height: 160px;
    max-height: 260px;
    resize: vertical;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.45;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.mass-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    color: #888;
    font-size: 0.85rem;
}

.mass-meta strong {
    color: #43afff;
}

.mass-method-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 16px 0;
}

.mass-method-picker {
    width: 100% !important;
    margin-top: 0 !important;
    padding: 10px 12px !important;
    text-transform: none !important;
    font-size: 0.82rem !important;
    line-height: 1.3;
    white-space: normal;
}

.mass-method-picker.active {
    color: #43afff !important;
    background: #fff !important;
}

.mass-method-picker span {
    display: block;
    font-size: 0.72rem;
    font-weight: 500;
    opacity: 0.85;
    margin-top: 4px;
    text-transform: none;
}

.mass-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.mass-actions .main-button,
.mass-actions .main-history-button {
    margin-top: 0;
    flex: 1;
    min-width: 120px;
}

.mass-progress-wrap {
    display: none;
    margin-top: 18px;
}

.mass-progress-wrap.visible {
    display: block;
}

.mass-progress-top {
    display: flex;
    justify-content: space-between;
    color: #aaa;
    font-size: 0.85rem;
    margin-bottom: 6px;
}

.mass-progress-bar {
    height: 8px;
    background: #141414;
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid #333;
}

.mass-progress-fill {
    height: 100%;
    width: 0%;
    background: #43afff;
    border-radius: 5px;
    transition: width 0.3s ease;
}

.mass-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 16px;
}

.mass-stat {
    background: #1a1a1a;
    border-radius: 8px;
    border-left: 4px solid #43afff;
    padding: 12px;
    text-align: center;
}

.mass-stat.valid { border-left-color: #22c55e; }
.mass-stat.invalid { border-left-color: #ef4444; }
.mass-stat.errors { border-left-color: #f59e0b; }

.mass-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
}

.mass-stat-label {
    margin-top: 4px;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #888;
    letter-spacing: 0.05em;
}

.mass-status-line {
    margin-top: 14px;
    padding: 10px 12px;
    border-radius: 5px;
    background: #252525;
    color: #ccc;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mass-status-line.processing i.fa-spinner {
    animation: massSpin 1s linear infinite;
}

.mass-status-line.done {
    color: #86efac;
}

@keyframes massSpin {
    to { transform: rotate(360deg); }
}

@media (max-width: 640px) {
    .mass-method-row { grid-template-columns: 1fr; }
    .mass-stats { grid-template-columns: 1fr; }
}
