/* tools/development/hash/assets/css/hash.css */

/* ── Input Area ─────────────────────────────────────────────────── */
.hash-textarea {
    width: 100%;
    height: 180px;
    padding: 15px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 14px;
    resize: vertical;
    background-color: #f8fafc;
    color: #334155;
    line-height: 1.6;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.hash-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

/* ── Salt input ─────────────────────────────────────────────────── */
.hash-salt-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.hash-salt-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted, #555);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 5px;
}

.hash-salt-input {
    flex: 1;
    min-width: 200px;
    padding: 10px 14px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 14px;
    background: #f8fafc;
    color: #334155;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.hash-salt-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

/* ── Salt position selector ─────────────────────────────────────── */
.hash-salt-pos {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.hash-pos-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
    padding: 7px 12px;
    border: 2px solid var(--border-color);
    border-radius: 20px;
    background: #f8fafc;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    user-select: none;
}

.hash-pos-label:has(input:checked) {
    background: #eff6ff;
    border-color: var(--primary-color, #0066ff);
    color: var(--primary-color, #0066ff);
    font-weight: 600;
}

.hash-pos-label input[type="radio"] {
    accent-color: var(--primary-color, #0066ff);
}

/* ── Actions ────────────────────────────────────────────────────── */
.hash-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 20px 0;
    flex-wrap: wrap;
}

/* ── Result Table ───────────────────────────────────────────────── */
.hash-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
    margin-top: 8px;
}

.hash-table thead th {
    background: var(--primary-color, #1e3a8a);
    color: #fff;
    padding: 10px 14px;
    text-align: left;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.hash-table thead th:last-child {
    width: 80px;
    text-align: center;
}

.hash-table tbody tr:nth-child(even) td {
    background: #f8fafc;
}

.hash-table tbody tr:hover td {
    background: #eff6ff;
}

.hash-table td {
    padding: 11px 14px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.hash-algo {
    font-weight: 700;
    color: var(--primary-color, #0066ff);
    white-space: nowrap;
    font-size: 13px;
    min-width: 90px;
}

.hash-value {
    font-family: 'Consolas', 'Courier New', monospace;
    word-break: break-all;
    color: #1e293b;
    font-size: 13px;
}

.hash-bits {
    font-size: 11px;
    color: #64748b;
    white-space: nowrap;
    padding-right: 10px;
}

.hash-copy-cell {
    text-align: center;
}

/* ── Misc ───────────────────────────────────────────────────────── */
.error-message {
    background-color: #fee2e2;
    border-left: 4px solid #ef4444;
    color: #991b1b;
    padding: 12px 16px;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 16px;
}

.copied {
    background-color: #10b981 !important;
}
.copied:hover {
    background-color: #059669 !important;
}
