/* ════════════════════════════════════════════════════════════════════════════
   RECATOOLS — Hash Generator — style.css
   Tool-specific overrides only.
   Base styles live in /assets/css/tool-page.css.
   ════════════════════════════════════════════════════════════════════════════ */

/* ── Input mode tabs (Text | File) ──────────────────────────────────────────── */
.hg-mode-tabs {
    display:   flex;
    gap:       0.375rem;
    margin-bottom: 1rem;
}
.hg-mode-tab {
    padding:       0.4rem 1.125rem;
    border:        1.5px solid var(--border);
    border-radius: 999px;
    background:    #fff;
    color:         var(--muted);
    font-size:     0.875rem;
    font-weight:   700;
    cursor:        pointer;
    transition:    background 0.15s, border-color 0.15s, color 0.15s;
}
.hg-mode-tab.active {
    background:   var(--accent);
    border-color: var(--accent);
    color:        #fff;
}

/* ── Encoding pills ──────────────────────────────────────────────────────────── */
.hg-encoding-row {
    display:     flex;
    align-items: center;
    gap:         0.5rem;
    margin:      0.625rem 0 1rem;
    font-size:   0.8125rem;
    font-weight: 600;
    color:       var(--muted);
}
.hg-enc-pill {
    padding:       0.3rem 0.75rem;
    border:        1.5px solid var(--border);
    border-radius: 999px;
    background:    #fff;
    color:         var(--text);
    font-size:     0.8125rem;
    font-weight:   600;
    cursor:        pointer;
    transition:    background 0.15s, border-color 0.15s, color 0.15s;
}
.hg-enc-pill.active {
    background:   var(--accent);
    border-color: var(--accent);
    color:        #fff;
}

/* ── Hash input textarea ─────────────────────────────────────────────────────── */
.hg-textarea {
    width:         100%;
    min-height:    110px;
    padding:       0.875rem 1rem;
    font-family:   'SFMono-Regular', 'Consolas', 'IBM Plex Sans', monospace;
    font-size:     0.9rem;
    line-height:   1.6;
    color:         var(--text);
    background:    var(--bg);
    border:        1.5px solid var(--border);
    border-radius: 10px;
    resize:        vertical;
    box-sizing:    border-box;
    transition:    border-color 0.15s;
}
.hg-textarea:focus {
    outline:      none;
    border-color: var(--accent);
}

/* ── File drop zone ──────────────────────────────────────────────────────────── */
.hg-drop-zone {
    display:        flex;
    flex-direction: column;
    align-items:    center;
    justify-content: center;
    gap:            0.625rem;
    min-height:     140px;
    border:         2px dashed var(--border);
    border-radius:  12px;
    background:     var(--bg);
    cursor:         pointer;
    padding:        1.5rem 1rem;
    text-align:     center;
    transition:     border-color 0.15s, background 0.15s;
    user-select:    none;
}
.hg-drop-zone:hover,
.hg-drop-zone.drag-over {
    border-color: var(--accent);
    background:   #fdf4f0;
}
.hg-drop-icon {
    font-size: 2rem;
    line-height: 1;
}
.hg-drop-label {
    font-size:   0.9rem;
    font-weight: 600;
    color:       var(--text);
}
.hg-drop-sub {
    font-size: 0.8rem;
    color:     var(--muted);
}
.hg-file-info {
    margin-top:  0.625rem;
    font-size:   0.875rem;
    font-weight: 600;
    color:       var(--accent);
}

/* ── Hash output rows ────────────────────────────────────────────────────────── */
.hash-outputs {
    display:        flex;
    flex-direction: column;
    gap:            0.625rem;
    margin-top:     1.25rem;
}
.hash-row {
    display:       grid;
    grid-template-columns: 68px 1fr auto;
    align-items:   center;
    gap:           0.625rem;
    background:    var(--bg);
    border:        1.5px solid var(--border);
    border-radius: 10px;
    padding:       0.625rem 0.875rem;
}
.hash-algo {
    font-size:   0.75rem;
    font-weight: 800;
    color:       var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
}
.hash-value {
    font-family:     'SFMono-Regular', 'Consolas', monospace;
    font-size:       0.78rem;
    color:           var(--text);
    word-break:      break-all;
    overflow-wrap:   break-word;
    line-height:     1.4;
    min-width:       0;
}
.hash-copy-btn {
    padding:       0.3rem 0.75rem;
    border:        1.5px solid var(--border);
    border-radius: 6px;
    background:    #fff;
    color:         var(--text);
    font-size:     0.78rem;
    font-weight:   700;
    cursor:        pointer;
    white-space:   nowrap;
    transition:    background 0.15s, border-color 0.15s, color 0.15s;
    flex-shrink:   0;
}
.hash-copy-btn:hover {
    background:   var(--accent);
    border-color: var(--accent);
    color:        #fff;
}

/* ── Privacy notice box ──────────────────────────────────────────────────────── */
.hg-privacy-note {
    display:       flex;
    align-items:   flex-start;
    gap:           0.625rem;
    margin-top:    1rem;
    padding:       0.75rem 1rem;
    background:    #e8f4fd;
    border:        1px solid #b3d7f0;
    border-radius: 10px;
    font-size:     0.8125rem;
    color:         #1a5276;
    line-height:   1.5;
}
.hg-privacy-note strong {
    font-weight: 700;
}

/* ── HMAC collapsible section ────────────────────────────────────────────────── */
.hg-section-collapse {
    border:        1.5px solid var(--border);
    border-radius: 12px;
    overflow:      hidden;
    margin-top:    1.25rem;
}
.hg-section-header {
    display:         flex;
    align-items:     center;
    justify-content: space-between;
    padding:         0.75rem 1rem;
    background:      var(--bg);
    cursor:          pointer;
    font-size:       0.9rem;
    font-weight:     700;
    color:           var(--text);
    border:          none;
    width:           100%;
    text-align:      left;
    transition:      background 0.15s;
}
.hg-section-header:hover {
    background: #f3f2ef;
}
.collapse-icon {
    font-size:   1.1rem;
    font-weight: 400;
    color:       var(--muted);
    line-height: 1;
}
.hg-section-body {
    padding:    0.875rem 1rem 1rem;
    border-top: 1px solid var(--border);
}
.hg-section-body[hidden] {
    display: none;
}

/* ── HMAC input + result row ─────────────────────────────────────────────────── */
.hg-hmac-label {
    font-size:     0.8125rem;
    font-weight:   700;
    color:         var(--muted);
    display:       block;
    margin-bottom: 0.375rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.hg-input {
    width:         100%;
    padding:       0.6rem 0.875rem;
    font-family:   'SFMono-Regular', 'Consolas', monospace;
    font-size:     0.875rem;
    color:         var(--text);
    background:    var(--bg);
    border:        1.5px solid var(--border);
    border-radius: 8px;
    box-sizing:    border-box;
    transition:    border-color 0.15s;
}
.hg-input:focus {
    outline:      none;
    border-color: var(--accent);
}
.hg-hmac-result-row {
    display:       grid;
    grid-template-columns: 1fr auto;
    align-items:   center;
    gap:           0.5rem;
    margin-top:    0.625rem;
    background:    var(--bg);
    border:        1.5px solid var(--border);
    border-radius: 8px;
    padding:       0.5rem 0.75rem;
}
.hg-hmac-value {
    font-family:   'SFMono-Regular', 'Consolas', monospace;
    font-size:     0.78rem;
    color:         var(--text);
    word-break:    break-all;
    min-width:     0;
}

/* ── Compare / Verify section ────────────────────────────────────────────────── */
.compare-result {
    margin-top:  0.625rem;
    font-size:   0.9rem;
    font-weight: 700;
    min-height:  1.5rem;
}
.compare-result--match   { color: #1a8c5e; }
.compare-result--nomatch { color: #c0392b; }
.compare-match   { font-size: 1.1rem; }
.compare-nomatch { font-size: 1.1rem; }

.hg-compare-row {
    display:     flex;
    gap:         0.5rem;
    flex-wrap:   wrap;
    margin-top:  0.625rem;
}
.hg-compare-select {
    padding:       0.5rem 0.75rem;
    border:        1.5px solid var(--border);
    border-radius: 8px;
    background:    var(--bg);
    color:         var(--text);
    font-size:     0.875rem;
    font-weight:   600;
    cursor:        pointer;
    flex-shrink:   0;
}
.hg-compare-select:focus {
    outline:      none;
    border-color: var(--accent);
}

/* ── Responsive: stack hash rows on mobile ───────────────────────────────────── */
@media (max-width: 520px) {
    .hash-row {
        grid-template-columns: 1fr auto;
        grid-template-rows:    auto auto;
    }
    .hash-algo  { grid-row: 1; grid-column: 1; }
    .hash-copy-btn { grid-row: 1; grid-column: 2; }
    .hash-value { grid-row: 2; grid-column: 1 / -1; }
}

/* cache-buster: 2026-05-24T05:06:05Z */
