/* Hash Generator — Plugin Styles */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600;700&family=Syne:wght@400;600;700;800&display=swap');

:root {
    --ict-hg-bg: transparent;
    --ict-hg-card: transparent;
    --ict-hg-border: #cccccc;
    --ict-hg-accent: #1d4ed8;
    --ict-hg-accent-light: rgba(29,78,216,0.07);
    --ict-hg-accent-glow: rgba(29,78,216,0.18);
    --ict-hg-text: #111111;
    --ict-hg-muted: #444444;
    --ict-hg-error: #dc2626;
    --ict-hg-radius: 14px;
    --ict-hg-font-ui: 'Syne', sans-serif;
    --ict-hg-font-mono: 'JetBrains Mono', monospace;

    /* Per-algorithm colors */
    --ict-hg-md5:     #dc2626;
    --ict-hg-sha1:    #ea580c;
    --ict-hg-sha224:  #ca8a04;
    --ict-hg-sha256:  #16a34a;
    --ict-hg-sha384:  #0891b2;
    --ict-hg-sha512:  #7c3aed;
}

.ict-hg-wrapper {
    font-family: var(--ict-hg-font-ui);
    color: var(--ict-hg-text);
    max-width: 660px;
    margin: 2rem auto;
}

.ict-hg-card {
    background: var(--ict-hg-card);
    border: 1px solid var(--ict-hg-border);
    border-radius: var(--ict-hg-radius);
    padding: 2rem 2.25rem;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}

.ict-hg-title {
    font-size: 1.6rem;
    font-weight: 800;
    margin: 0 0 0.4rem;
    letter-spacing: -0.03em;
    color: #111111;
}

.ict-hg-subtitle {
    font-size: 0.88rem;
    color: #444444;
    margin: 0 0 1.75rem;
    line-height: 1.5;
}

/* === FIELD === */
.ict-hg-field {
    margin-bottom: 1.1rem;
}

.ict-hg-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #444444;
    margin-bottom: 0.45rem;
}

.ict-hg-textarea {
    width: 100%;
    background: #ffffff;
    border: 1px solid var(--ict-hg-border);
    border-radius: 10px;
    color: #111111;
    font-family: var(--ict-hg-font-mono);
    font-size: 0.92rem;
    padding: 0.75rem 1rem;
    outline: none;
    resize: vertical;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    line-height: 1.6;
}

.ict-hg-textarea:focus {
    border-color: var(--ict-hg-accent);
    box-shadow: 0 0 0 3px var(--ict-hg-accent-glow);
}

.ict-hg-input-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.4rem;
}

.ict-hg-char-count {
    font-size: 0.75rem;
    color: #888888;
    font-family: var(--ict-hg-font-mono);
}

.ict-hg-btn-clear {
    background: transparent;
    border: none;
    color: #888888;
    font-size: 0.75rem;
    font-family: var(--ict-hg-font-ui);
    font-weight: 600;
    cursor: pointer;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
}

.ict-hg-btn-clear:hover {
    color: var(--ict-hg-error);
    background: rgba(220,38,38,0.07);
}

/* === ALGORITHM GRID === */
.ict-hg-algo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
}

.ict-hg-algo-option {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    background: #ffffff;
    border: 1px solid var(--ict-hg-border);
    border-radius: 10px;
    padding: 0.65rem 0.85rem;
    cursor: pointer;
    transition: border-color 0.18s, background 0.18s;
    user-select: none;
}

.ict-hg-algo-option:hover {
    border-color: var(--ict-hg-accent);
    background: var(--ict-hg-accent-light);
}

.ict-hg-algo-option input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.ict-hg-algo-check {
    width: 18px;
    height: 18px;
    border: 2px solid var(--ict-hg-border);
    border-radius: 5px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.18s, border-color 0.18s;
}

.ict-hg-algo-option input:checked + .ict-hg-algo-check {
    background: var(--ict-hg-accent);
    border-color: var(--ict-hg-accent);
}

.ict-hg-algo-option input:checked + .ict-hg-algo-check::after {
    content: '';
    display: block;
    width: 4px;
    height: 8px;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg) translate(-1px,-1px);
}

.ict-hg-algo-option:has(input:checked) {
    border-color: var(--ict-hg-accent);
    background: var(--ict-hg-accent-light);
}

.ict-hg-algo-name {
    font-family: var(--ict-hg-font-mono);
    font-size: 0.88rem;
    font-weight: 700;
    color: #111111;
    flex: 1;
}

.ict-hg-algo-bits {
    font-size: 0.7rem;
    color: #888888;
    font-family: var(--ict-hg-font-mono);
}

/* === OPTIONS ROW === */
.ict-hg-options-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.ict-hg-toggle-group {
    display: flex;
    border: 1px solid var(--ict-hg-border);
    border-radius: 8px;
    overflow: hidden;
}

.ict-hg-toggle {
    background: transparent;
    border: none;
    padding: 0.35rem 0.85rem;
    font-family: var(--ict-hg-font-mono);
    font-size: 0.78rem;
    font-weight: 600;
    color: #444444;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.ict-hg-toggle + .ict-hg-toggle { border-left: 1px solid var(--ict-hg-border); }

.ict-hg-toggle.active {
    background: var(--ict-hg-accent);
    color: #ffffff;
}

.ict-hg-live-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #444444;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    cursor: pointer;
    user-select: none;
}

.ict-hg-live-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.ict-hg-checkbox-custom {
    width: 18px;
    height: 18px;
    border: 2px solid var(--ict-hg-border);
    border-radius: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.18s, border-color 0.18s;
}

.ict-hg-live-label input:checked + .ict-hg-checkbox-custom {
    background: var(--ict-hg-accent);
    border-color: var(--ict-hg-accent);
}

.ict-hg-live-label input:checked + .ict-hg-checkbox-custom::after {
    content: '';
    display: block;
    width: 4px;
    height: 8px;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg) translate(-1px,-1px);
}

.ict-hg-btn-select-all {
    background: transparent;
    border: 1px solid var(--ict-hg-border);
    border-radius: 7px;
    color: #111111;
    font-family: var(--ict-hg-font-ui);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.3rem 0.85rem;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    margin-left: auto;
}

.ict-hg-btn-select-all:hover {
    background: var(--ict-hg-accent);
    border-color: var(--ict-hg-accent);
    color: #ffffff;
}

/* === ERROR === */
.ict-hg-error {
    color: var(--ict-hg-error);
    font-size: 0.82rem;
    background: rgba(220,38,38,0.08);
    border: 1px solid rgba(220,38,38,0.25);
    border-radius: 8px;
    padding: 0.6rem 0.9rem;
    margin-bottom: 1rem;
}

/* === GENERATE BUTTON === */
.ict-hg-btn-generate {
    width: 100%;
    background: var(--ict-hg-accent);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 0.85rem 1.5rem;
    font-family: var(--ict-hg-font-ui);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: opacity 0.18s, transform 0.12s, box-shadow 0.18s;
    box-shadow: 0 4px 18px var(--ict-hg-accent-glow);
}

.ict-hg-btn-generate:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 6px 26px var(--ict-hg-accent-glow);
}

.ict-hg-btn-generate:active { transform: scale(0.98); }

.ict-hg-btn-icon {
    font-size: 1.15em;
    font-weight: 800;
    font-family: var(--ict-hg-font-mono);
}

/* === RESULTS === */
.ict-hg-results {
    margin-top: 1.5rem;
    animation: ict-hg-fadein 0.3s ease;
}

@keyframes ict-hg-fadein {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.ict-hg-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.65rem;
}

.ict-hg-results-title {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #444444;
}

.ict-hg-btn-copy-all {
    background: transparent;
    border: 1px solid var(--ict-hg-border);
    border-radius: 7px;
    color: #111111;
    font-family: var(--ict-hg-font-ui);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.3rem 0.85rem;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.ict-hg-btn-copy-all:hover {
    background: var(--ict-hg-accent);
    border-color: var(--ict-hg-accent);
    color: #ffffff;
}

.ict-hg-btn-copy-all.copied {
    background: #16a34a;
    border-color: #16a34a;
    color: #ffffff;
}

/* === RESULT ROW === */
.ict-hg-results-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.ict-hg-result-row {
    border: 1px solid var(--ict-hg-border);
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.15s;
}

.ict-hg-result-row:hover { border-color: var(--ict-hg-accent); }

.ict-hg-result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.85rem;
    border-bottom: 1px solid var(--ict-hg-border);
    background: #f9f9f9;
}

.ict-hg-result-algo {
    font-family: var(--ict-hg-font-mono);
    font-size: 0.82rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.ict-hg-result-algo-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
}

.ict-hg-result-meta {
    font-size: 0.72rem;
    color: #888888;
    font-family: var(--ict-hg-font-mono);
}

.ict-hg-result-body {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
}

.ict-hg-result-hash {
    flex: 1;
    font-family: var(--ict-hg-font-mono);
    font-size: 0.85rem;
    font-weight: 600;
    word-break: break-all;
    letter-spacing: 0.04em;
    line-height: 1.6;
}

.ict-hg-result-copy {
    flex-shrink: 0;
    background: transparent;
    border: 1px solid var(--ict-hg-border);
    border-radius: 6px;
    color: #111111;
    font-family: var(--ict-hg-font-ui);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.3rem 0.7rem;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.ict-hg-result-copy:hover {
    background: var(--ict-hg-accent);
    border-color: var(--ict-hg-accent);
    color: #ffffff;
}

.ict-hg-result-copy.copied {
    background: #16a34a;
    border-color: #16a34a;
    color: #ffffff;
}

/* Algorithm colors */
.ict-hg-color-md5    { color: var(--ict-hg-md5); }
.ict-hg-color-sha1   { color: var(--ict-hg-sha1); }
.ict-hg-color-sha224 { color: var(--ict-hg-sha224); }
.ict-hg-color-sha256 { color: var(--ict-hg-sha256); }
.ict-hg-color-sha384 { color: var(--ict-hg-sha384); }
.ict-hg-color-sha512 { color: var(--ict-hg-sha512); }

.ict-hg-dot-md5    { background: var(--ict-hg-md5); }
.ict-hg-dot-sha1   { background: var(--ict-hg-sha1); }
.ict-hg-dot-sha224 { background: var(--ict-hg-sha224); }
.ict-hg-dot-sha256 { background: var(--ict-hg-sha256); }
.ict-hg-dot-sha384 { background: var(--ict-hg-sha384); }
.ict-hg-dot-sha512 { background: var(--ict-hg-sha512); }

/* === DISCLAIMER === */
.ict-hg-disclaimer {
    font-size: 0.78rem;
    color: #888888;
    border-top: 1px solid var(--ict-hg-border);
    padding-top: 0.85rem;
    margin: 1rem 0 0;
    line-height: 1.5;
}

/* Responsive */
@media (max-width: 520px) {
    .ict-hg-card { padding: 1.5rem 1.1rem; }
    .ict-hg-algo-grid { grid-template-columns: repeat(2, 1fr); }
    .ict-hg-options-row { gap: 0.5rem; }
}
