/* ==========================================================================
   EasyToolio Password Tools Standard Design System
   Password Strength Checker & Password Generator
   Apple Glass & Modern Card System (Matching BMI Tool Standard)
   ========================================================================== */

/* ── Apple Glass & Modern Card System ── */
.apple-glass {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}
.dark .apple-glass {
    background: rgba(18, 18, 20, 0.65);
}

.apple-card {
    background: #ffffff;
    border: 1px solid #e4e4e7;
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.dark .apple-card {
    background: rgba(29, 29, 31, 0.45);
    border-color: rgba(255, 255, 255, 0.06);
    box-shadow: none;
}
.apple-card:hover {
    border-color: rgba(16, 185, 129, 0.3);
    box-shadow: 0 10px 30px -10px rgba(16, 185, 129, 0.15);
}

/* Primary Result Highlight Card */
.pw-result-card {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.06) 0%, rgba(6, 182, 212, 0.04) 100%), #ffffff;
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 1.25rem;
    position: relative;
    overflow: hidden;
}
.dark .pw-result-card {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(6, 182, 212, 0.05) 100%), rgba(24, 24, 27, 0.85);
    border-color: rgba(16, 185, 129, 0.25);
}

/* Mode Switcher Tab Buttons (Zero black border / seamless toggle) */
.checker-tab-btn {
    border: 1px solid transparent !important;
    background-color: transparent !important;
    color: #71717a !important;
    outline: none !important;
    box-shadow: none !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
}
.dark .checker-tab-btn {
    color: #a1a1aa !important;
}
.checker-tab-btn:hover {
    color: #18181b !important;
}
.dark .checker-tab-btn:hover {
    color: #ffffff !important;
}
.checker-tab-btn.active {
    color: #059669 !important;
    border-color: #059669 !important;
    background-color: #ffffff !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08) !important;
}
.dark .checker-tab-btn.active {
    color: #34d399 !important;
    border-color: #34d399 !important;
    background-color: #27272a !important;
    box-shadow: none !important;
}

.gen-mode-tab {
    border: 1px solid transparent !important;
    background-color: transparent !important;
    color: #71717a !important;
    outline: none !important;
    box-shadow: none !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
}
.dark .gen-mode-tab {
    color: #a1a1aa !important;
}
.gen-mode-tab:hover {
    color: #18181b !important;
}
.dark .gen-mode-tab:hover {
    color: #ffffff !important;
}
.gen-mode-tab.active {
    color: #059669 !important;
    border-color: #059669 !important;
    background-color: #ffffff !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08) !important;
}
.dark .gen-mode-tab.active {
    color: #34d399 !important;
    border-color: #34d399 !important;
    background-color: #27272a !important;
    box-shadow: none !important;
}

/* Neutralize Global Input Rules & In-field Background Squares */
#passwordInput,
#passwordOutput,
.pw-clean-input {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

/* Ensure no scrollbar is shown on touch/mobile scroll areas */
.no-scrollbar::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}
.no-scrollbar {
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
}

/* Fix Score Number Truncation Bug (Never truncate score numbers like 7.. / 100) */
.pw-score-num {
    font-variant-numeric: tabular-nums;
    line-height: 1 !important;
    display: inline-block !important;
    min-width: fit-content !important;
    max-width: none !important;
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}

/* ── Visual 5-Segment Strength Spectrum Gauge Bar (Guaranteed Vivid Colors) ── */
.gauge-track {
    display: flex !important;
    width: 100% !important;
    height: 12px !important;
    border-radius: 9999px !important;
    overflow: hidden !important;
    background: #e4e4e7 !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06) !important;
}
.dark .gauge-track {
    background: #18181b !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4) !important;
}

.gauge-seg-1 { width: 20% !important; background-color: #f43f5e !important; } /* Critical - Rose */
.gauge-seg-2 { width: 20% !important; background-color: #f97316 !important; } /* Weak - Orange */
.gauge-seg-3 { width: 20% !important; background-color: #f59e0b !important; } /* Fair - Amber */
.gauge-seg-4 { width: 20% !important; background-color: #0d9488 !important; } /* Strong - Teal */
.gauge-seg-5 { width: 20% !important; background-color: #10b981 !important; } /* Enterprise - Emerald */

.gauge-seg-1, .gauge-seg-2, .gauge-seg-3, .gauge-seg-4, .gauge-seg-5 {
    height: 100% !important;
    display: block !important;
    flex-shrink: 0 !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.gauge-bar-segment.active-segment,
.gen-gauge-bar-segment.active-segment {
    filter: brightness(1.25) saturate(1.25) drop-shadow(0 0 6px currentColor) !important;
    transform: scaleY(1.2) !important;
}
.indicator-arrow {
    transition: left 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* ── 1Password-Style Character Syntax Highlighting & Breakdown Bars ── */
.pw-syntax-char-letter {
    color: #0f172a;
    font-weight: 700;
}
.dark .pw-syntax-char-letter {
    color: #f8fafc;
}
.pw-syntax-char-digit {
    color: #2563eb !important; /* 1Password signature vibrant blue digits */
    font-weight: 800 !important;
}
.dark .pw-syntax-char-digit {
    color: #60a5fa !important;
}
.pw-syntax-char-symbol {
    color: #d97706 !important; /* Amber / Orange special symbols */
    font-weight: 800 !important;
}
.dark .pw-syntax-char-symbol {
    color: #fbbf24 !important;
}
.pw-syntax-char-sep {
    color: #94a3b8 !important; /* Muted separators */
    font-weight: 700 !important;
}
.dark .pw-syntax-char-sep {
    color: #64748b !important;
}

/* Character Density Specific Colors (Numbers in Blue, Symbols in Amber) */
#genBarNumbers,
#barNumbers {
    background-color: #2563eb !important;
}
#genBarSymbols,
#barSymbols {
    background-color: #d97706 !important;
}

/* ── Crack Time Threat Colors (Never misleadingly green on weak passwords) ── */
.crack-time-critical { color: #f43f5e !important; }
.dark .crack-time-critical { color: #fb7185 !important; }
.crack-time-weak { color: #f97316 !important; }
.dark .crack-time-weak { color: #fb923c !important; }
.crack-time-fair { color: #d97706 !important; }
.dark .crack-time-fair { color: #fbbf24 !important; }
.crack-time-strong { color: #0d9488 !important; }
.dark .crack-time-strong { color: #2dd4bf !important; }
.crack-time-enterprise { color: #059669 !important; }
.dark .crack-time-enterprise { color: #34d399 !important; }

/* ── Primary Action Button (Pure white text on emerald, matching Password Strength) ── */
#btnCopyPassword,
.btn-primary-emerald {
    background-color: #059669 !important;
    color: #ffffff !important;
    font-weight: 700 !important;
}
#btnCopyPassword:hover,
.btn-primary-emerald:hover {
    background-color: #047857 !important;
    color: #ffffff !important;
}
#btnCopyPassword *,
.btn-primary-emerald * {
    color: #ffffff !important;
}

/* ── Section Eyebrow Theme Color Override (Guides & FAQs: Security Emerald #059669 / #34d399) ── */
html body #related-guides .tg-eyebrow,
html body .tool-guide .tg-eyebrow,
html body .tg-eyebrow,
html body .ht-eyebrow,
#related-guides .tg-eyebrow,
.tg-eyebrow,
.ht-eyebrow {
    color: #059669 !important;
}
html.dark body #related-guides .tg-eyebrow,
html.dark body .tool-guide .tg-eyebrow,
html.dark body .tg-eyebrow,
html.dark body .ht-eyebrow,
html.dark #related-guides .tg-eyebrow,
html.dark .tg-eyebrow,
html.dark .ht-eyebrow {
    color: #34d399 !important;
}

/* Formatted Display Box for 1Password Style */
.pw-formatted-display {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    letter-spacing: 0.05em;
    word-break: break-all;
    line-height: 1.5;
    user-select: all;
    -webkit-user-select: all;
}

/* Gauge Value Pill (Never wrap digits vertically like 1 \n 0 \n 0) */
#gauge-value,
#gen-gauge-value,
.pw-gauge-value {
    white-space: nowrap !important;
    min-width: max-content !important;
    flex-shrink: 0 !important;
    display: inline-block !important;
    line-height: 1.2 !important;
    word-break: keep-all !important;
}

/* Modern Range Sliders */
.pw-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: #e4e4e7;
    border-radius: 9999px;
    outline: none;
    cursor: pointer;
    margin: 0.5rem 0 0.15rem 0;
    transition: background 0.2s ease;
}
.dark .pw-slider {
    background: rgba(255, 255, 255, 0.12);
}
.pw-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #059669;
    border: 2.5px solid #ffffff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    cursor: grab;
    transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.15s ease, box-shadow 0.15s ease;
}
.dark .pw-slider::-webkit-slider-thumb {
    border-color: #18181b;
}
.pw-slider::-webkit-slider-thumb:hover {
    transform: scale(1.18);
    background: #10b981;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.25);
}
.pw-slider::-webkit-slider-thumb:active {
    cursor: grabbing;
    transform: scale(1.1);
}
.pw-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #059669;
    border: 2.5px solid #ffffff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    cursor: grab;
}

/* Stepper Buttons */
.pw-step-btn {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f4f4f5;
    color: #52525b;
    border: 1px solid #e4e4e7;
    font-size: 11px;
    font-weight: 700;
    transition: all 0.15s ease;
    cursor: pointer;
}
.pw-step-btn:hover {
    background: #10b981;
    color: #ffffff;
    border-color: #10b981;
}
.dark .pw-step-btn {
    background: rgba(255, 255, 255, 0.05);
    color: #d4d4d8;
    border-color: rgba(255, 255, 255, 0.1);
}
.dark .pw-step-btn:hover {
    background: #10b981;
    color: #ffffff;
    border-color: #10b981;
}

/* Display & Monospace Syntax */
.pw-display-box {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    letter-spacing: 0.04em;
    word-break: break-all;
    line-height: 1.6;
    transition: all 0.2s ease;
}

/* Live Criteria Pill Badges */
.crit-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.65rem;
    border-radius: 0.625rem;
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1.2;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
    border: 1px solid #e4e4e7;
    background: #f4f4f5;
    color: #71717a;
    cursor: pointer;
    font-family: inherit;
    outline: none;
}
.dark .crit-badge {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
    color: #a1a1aa;
}
.crit-badge:hover {
    border-color: rgba(16, 185, 129, 0.4);
    background: #ffffff;
    color: #18181b;
    transform: translateY(-0.5px);
}
.dark .crit-badge:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(52, 211, 153, 0.3);
    color: #f4f4f5;
}
.crit-badge:active {
    transform: scale(0.96);
}
.crit-badge.is-passed {
    background: rgba(16, 185, 129, 0.12) !important;
    border-color: rgba(16, 185, 129, 0.35) !important;
    color: #047857 !important;
    font-weight: 700 !important;
    box-shadow: 0 1px 3px rgba(16, 185, 129, 0.08);
}
.dark .crit-badge.is-passed {
    background: rgba(16, 185, 129, 0.18) !important;
    border-color: rgba(52, 211, 153, 0.4) !important;
    color: #34d399 !important;
}

/* Preset buttons hover */
.preset-chip {
    transition: all 0.2s ease;
}
.preset-chip:hover {
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: 0 4px 12px -2px rgba(16, 185, 129, 0.15);
    transform: translateY(-1px);
}

/* Regenerate icon spin */
@keyframes pw-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.pw-spinning {
    animation: pw-spin 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Custom Checkbox Pill */
.pw-checkbox-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    border: 1px solid #e4e4e7;
    background: #fafafa;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}
.dark .pw-checkbox-card {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
}
.pw-checkbox-card:hover {
    border-color: rgba(16, 185, 129, 0.4);
    background: rgba(16, 185, 129, 0.03);
}
.dark .pw-checkbox-card:hover {
    background: rgba(255, 255, 255, 0.06);
}
.pw-checkbox-card input[type="checkbox"]:checked ~ div span:first-child {
    color: #059669;
}
.dark .pw-checkbox-card input[type="checkbox"]:checked ~ div span:first-child {
    color: #34d399;
}
