/* ═══════════════════════════════════════════════
   NFT Multi-Send - Styles v3
   ═══════════════════════════════════════════════ */

.th-multisend-wrap {
    max-width: 100%;
    margin: 0 auto;
    font-family: 'Montserrat', sans-serif;
    padding-bottom: 40px;
}

/* ── (réservé layout futur) ── */

/* ── Sections ── */
.th-ms-section {
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 16px;
    padding: 26px 28px 22px;
    margin-bottom: 16px;
    position: relative;
}

/* Section header */
.th-ms-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
}

.th-ms-title {
    color: #f0f0f0;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.2px;
}
.th-ms-desc {
    color: #888;
    font-size: 13px;
    margin: 0 0 20px 0;
    padding-left: 0;
    line-height: 1.6;
}

/* Divider inside sections */
.th-ms-divider {
    height: 1px;
    background: rgba(255,255,255,0.06);
    margin: 18px 0;
}

/* ── Fields ── */
.th-ms-row { margin-bottom: 16px; }
.th-ms-row:last-child { margin-bottom: 0; }
.th-ms-row-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 14px;
}

.th-ms-field label {
    display: block;
    color: #b0b0b0;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 8px;
}
.th-ms-field select,
.th-ms-input {
    width: 100%;
    padding: 11px 14px;
    background: rgba(0,0,0,0.35) !important;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    color: #e8e8e8 !important;
    font-size: 14px;
    font-family: 'Montserrat', sans-serif;
    outline: none;
    transition: border-color 0.25s, box-shadow 0.25s;
    color-scheme: dark;
    line-height: 1.4;
    box-sizing: border-box;
}
.th-ms-field select { height: auto; }
.th-ms-field select:focus,
.th-ms-input:focus {
    border-color: rgba(230,126,34,0.6);
    box-shadow: 0 0 0 3px rgba(230,126,34,0.08);
}
textarea.th-ms-input {
    resize: vertical;
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    font-size: 12.5px;
    line-height: 1.7;
}
.th-ms-field-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: wrap;
}

/* ── Inline row (flex) ── */
.th-ms-inline {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
}
.th-ms-inline .th-ms-field { flex: 0 0 auto; }

/* Harmoniser select + bouton dans la ligne calendrier */
.th-ms-inline .th-ms-field select,
.th-ms-inline .th-ms-btn {
    height: 42px;
    box-sizing: border-box;
}
.th-ms-inline .th-ms-btn {
    padding-top: 0;
    padding-bottom: 0;
    display: inline-flex;
    align-items: center;
}

/* ── Badge ── */
.th-ms-badge {
    background: #e67e22;
    color: #fff;
    padding: 2px 9px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    margin-left: 6px;
    vertical-align: middle;
}

/* ── Validation message ── */
.th-ms-validation-msg {
    font-size: 12px;
    font-weight: 600;
}
.th-ms-val-success { color: #2ecc71; }
.th-ms-val-error { color: #e74c3c; }

/* ── Buttons ── */
.th-ms-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s;
    font-family: 'Montserrat', sans-serif;
    white-space: nowrap;
}
.th-ms-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}
.th-ms-btn-primary {
    background: linear-gradient(135deg, #e67e22, #d35400);
    color: #fff;
    border-color: rgba(230,126,34,0.3);
}
.th-ms-btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(230,126,34,0.35);
}
.th-ms-btn-secondary {
    background: rgba(255,255,255,0.04);
    color: #ccc;
    border-color: rgba(255,255,255,0.12);
}
.th-ms-btn-secondary:hover:not(:disabled) {
    background: rgba(255,255,255,0.08);
    color: #fff;
    border-color: rgba(255,255,255,0.2);
}
.th-ms-btn-ghost {
    background: transparent;
    color: #888;
    border-color: transparent;
    padding: 10px 14px;
}
.th-ms-btn-ghost:hover { color: #e74c3c; }
.th-ms-btn-small {
    padding: 7px 16px;
    font-size: 11px;
    border-radius: 8px;
}
.th-ms-btn-accent {
    background: rgba(230,126,34,0.12);
    color: #e67e22;
    border-color: rgba(230,126,34,0.25);
}
.th-ms-btn-accent:hover:not(:disabled) {
    background: rgba(230,126,34,0.22);
}
.th-ms-btn-export {
    background: rgba(46,204,113,0.1);
    color: #2ecc71;
    border-color: rgba(46,204,113,0.25);
}
.th-ms-btn-export:hover:not(:disabled) {
    background: rgba(46,204,113,0.2);
}

/* ── Balance bar ── */
.th-ms-balance-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 13px;
    color: #aaa;
    flex-wrap: wrap;
}
.th-ms-balance-bar strong {
    color: #fff;
    font-weight: 700;
}
.th-ms-balance-sep {
    color: rgba(255,255,255,0.15);
    margin: 0 2px;
}

/* ── Progress ── */
.th-ms-progress-bar-wrap {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.05);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 14px;
}
.th-ms-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #e67e22, #f39c12);
    border-radius: 3px;
    transition: width 0.4s ease;
}
.th-ms-progress-text {
    color: #aaa;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
}

/* ── Log ── */
.th-ms-log {
    max-height: 260px;
    overflow-y: auto;
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 10px;
    padding: 16px;
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.8;
}
.th-ms-log-entry { color: #888; }
.th-ms-log-success { color: #2ecc71; }
.th-ms-log-error { color: #e74c3c; }
.th-ms-log-info { color: #bbb; }

.th-ms-log::-webkit-scrollbar { width: 4px; }
.th-ms-log::-webkit-scrollbar-track { background: transparent; }
.th-ms-log::-webkit-scrollbar-thumb { background: rgba(230,126,34,0.25); border-radius: 2px; }

/* ── History header ── */
.th-ms-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}
.th-ms-history-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* ═══════════════════════════════════════════════
   History cards - pas de scroll horizontal
   ═══════════════════════════════════════════════ */
.th-ms-history-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
}

.th-ms-hcard {
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 16px 20px;
    transition: border-color 0.2s;
}
.th-ms-hcard:hover {
    border-color: rgba(230,126,34,0.15);
}

/* Top row : date + statut */
.th-ms-hcard-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.th-ms-hcard-date {
    color: #999;
    font-size: 12px;
    font-weight: 600;
}

/* Status pills */
.th-ms-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}
.th-ms-status-ok {
    color: #2ecc71;
    background: rgba(46,204,113,0.1);
}
.th-ms-status-warn {
    color: #f39c12;
    background: rgba(243,156,18,0.1);
}
.th-ms-status-fail {
    color: #e74c3c;
    background: rgba(231,76,60,0.1);
}

/* Grid de meta - 4 colonnes fixes */
.th-ms-hcard-meta {
    display: grid;
    grid-template-columns: 1.5fr 0.8fr 0.6fr 1fr;
    gap: 10px 16px;
}
.th-ms-hcard-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.th-ms-hcard-label {
    color: #777;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}
.th-ms-hcard-value {
    color: #ddd;
    font-size: 13px;
    font-weight: 500;
    word-break: break-all;
}
.th-ms-hcard-value code {
    background: rgba(255,255,255,0.05);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    color: #ccc;
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    word-break: break-all;
}
.th-ms-hcard-value a {
    color: #5dade2;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    word-break: break-all;
}
.th-ms-hcard-value a:hover { color: #85c1e9; text-decoration: underline; }

/* Recipient count pill */
.th-ms-count-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    padding: 2px 8px;
    border-radius: 6px;
    background: rgba(255,255,255,0.06);
    color: #ddd;
    font-size: 13px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* ── Empty state ── */
.th-ms-empty {
    text-align: center;
    padding: 30px 20px;
    color: #666;
    font-size: 13px;
}

/* ── Loading ── */
.th-ms-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px;
    color: #888;
    font-size: 13px;
}
.th-ms-spinner {
    width: 20px; height: 20px;
    border: 2.5px solid rgba(230,126,34,0.15);
    border-top-color: #e67e22;
    border-radius: 50%;
    animation: th-ms-spin 0.7s linear infinite;
}
@keyframes th-ms-spin { to { transform: rotate(360deg); } }

/* ── Responsive ── */
@media (max-width: 600px) {
    .th-ms-section { padding: 20px 16px 18px; }
    .th-ms-row-grid { grid-template-columns: 1fr; }
    .th-ms-balance-bar { font-size: 12px; gap: 6px; }
    .th-ms-desc { padding-left: 0; }
    .th-ms-inline { flex-direction: column; align-items: stretch; }
    .th-ms-history-header { flex-direction: column; align-items: flex-start; }
    .th-ms-hcard-meta { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
    .th-ms-section { padding: 14px 12px !important; border-radius: 12px; }
    .th-ms-title { font-size: 13px !important; }
    .th-ms-btn { padding: 8px 14px !important; font-size: 11px !important; }
    .th-ms-balance-bar { flex-direction: column !important; align-items: flex-start !important; gap: 4px !important; font-size: 11px !important; }
    .th-ms-log { font-size: 11px !important; padding: 10px !important; }
    .th-ms-field-actions { flex-direction: column !important; align-items: stretch !important; }
    .th-ms-hcard { padding: 12px 14px; }
    .th-ms-hcard-meta { grid-template-columns: 1fr; }
}

/* ── Legacy compat (old class fallback) ── */
.th-ms-controls {
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 16px;
    padding: 26px 28px 22px;
    margin-bottom: 16px;
}
.th-ms-section-title {
    color: #f0f0f0;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 8px;
}
.th-ms-subtitle {
    color: #9a9a9a;
    font-size: 12.5px;
    margin-bottom: 18px;
    margin-top: 0;
}
