/**
 * Tools Shared Styles - johlem.net
 * Minimal design for security tools
 */

/* CSS Variables for tools (matches main.css minimal theme) */
:root {
    --color-bg: #0a0a0a;
    --color-bg-secondary: #111;
    --color-bg-card: #0d0d0d;
    --color-border: #222;
    --color-text: #e0e0e0;
    --color-text-muted: #666;
    --color-accent: #7d7;
    --color-error: #a55;
    --color-success: #7d7;
    --color-warning: #aa7;
    --font-mono: 'Courier New', Courier, monospace;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --border-radius: 0;
    --transition: all 0.2s;
}

/* Tool Header */
.tool-header {
    margin-bottom: 30px;
}

.tool-header h1 {
    font-size: 1.2em;
    font-weight: normal;
    color: #7d7;
    margin-bottom: 10px;
}

.tool-icon-large {
    font-size: 1.5rem;
    margin-right: 10px;
}

/* Tool Container */
.tool-container {
    max-width: 900px;
    margin: 0 auto;
}

/* Tool Input Section */
.tool-input-section {
    background: #111;
    border: 1px solid #222;
    padding: 20px;
    margin-bottom: 20px;
}

.tool-input-section label {
    display: block;
    margin-bottom: 10px;
    color: #888;
}

.tool-input-section textarea,
.tool-input-section input[type="text"],
.tool-input-section input[type="number"] {
    font-family: var(--font-mono);
    font-size: 0.9em;
    background: #0a0a0a;
    border: 1px solid #333;
    color: #e0e0e0;
    padding: 10px;
    width: 100%;
}

.tool-input-section textarea:focus,
.tool-input-section input:focus {
    outline: none;
    border-color: #555;
}

/* Tool Actions */
.tool-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

/* Tool Output Section */
.tool-output-section {
    background: #111;
    border: 1px solid #222;
    padding: 20px;
    margin-bottom: 20px;
}

.tool-output-section h3 {
    font-size: 1em;
    font-weight: normal;
    margin-bottom: 15px;
    color: #888;
}

/* Split View Layout */
.tool-split-view {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .tool-split-view {
        grid-template-columns: 1fr;
    }
}

/* Code Output */
.code-output {
    background: #0a0a0a;
    border: 1px solid #222;
    padding: 15px;
    font-family: var(--font-mono);
    font-size: 0.9em;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 400px;
    overflow-y: auto;
    color: #e0e0e0;
}

/* Result Item */
.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #151515;
    gap: 10px;
}

.result-item:last-child {
    border-bottom: none;
}

.result-label {
    color: #666;
    font-size: 0.9em;
}

.result-value {
    color: #e0e0e0;
    font-family: var(--font-mono);
    font-size: 0.9em;
    word-break: break-all;
    text-align: right;
}

/* Copy Button */
.btn-copy,
.copy-btn {
    padding: 4px 8px;
    font-size: 0.8em;
    background: transparent;
    border: 1px solid #333;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-copy:hover,
.copy-btn:hover {
    border-color: #555;
    color: #888;
}

.btn-copy.copied,
.copy-btn.copied {
    border-color: #7d7;
    color: #7d7;
}

/* Options Panel */
.tool-options {
    background: #111;
    border: 1px solid #222;
    padding: 15px;
    margin-bottom: 20px;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.option-group label {
    font-size: 0.9em;
    color: #666;
}

/* Checkbox/Radio Groups */
.checkbox-options {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.checkbox-option,
.checkbox-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9em;
    color: #888;
}

.checkbox-option input,
.checkbox-inline input {
    accent-color: #7d7;
}

/* Status Messages */
.status-message {
    padding: 15px;
    margin-bottom: 15px;
    text-align: center;
}

.status-message.success {
    background: rgba(119, 221, 119, 0.1);
    border: 1px solid #7d7;
    color: #7d7;
}

.status-message.error {
    background: rgba(170, 85, 85, 0.1);
    border: 1px solid #a55;
    color: #a55;
}

.status-message.warning {
    background: rgba(170, 170, 119, 0.1);
    border: 1px solid #aa7;
    color: #aa7;
}

/* Mode Tabs */
.mode-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
    background: #111;
    padding: 5px;
}

.mode-tab {
    flex: 1;
    padding: 10px 15px;
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 0.9em;
    transition: all 0.2s;
}

.mode-tab:hover {
    color: #888;
}

.mode-tab.active {
    background: #7d7;
    color: #0a0a0a;
}

.mode-content {
    display: none;
}

.mode-content.active {
    display: block;
}

/* File Drop Zone */
.file-drop-zone {
    border: 1px dashed #333;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.file-drop-zone:hover,
.file-drop-zone.dragover {
    border-color: #555;
    background: rgba(119, 221, 119, 0.02);
}

.file-drop-zone .file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.drop-icon {
    font-size: 2em;
    display: block;
    margin-bottom: 10px;
}

.drop-text p {
    margin: 0;
    color: #666;
}

/* File Info */
.file-info {
    margin-top: 15px;
    padding: 15px;
    background: #0a0a0a;
    font-size: 0.9em;
    color: #888;
}

/* Progress Bar */
.progress-bar {
    height: 4px;
    background: #111;
    margin-top: 15px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #7d7;
    width: 0%;
    transition: width 0.3s;
}

/* Verify Grid */
.verify-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

@media (max-width: 768px) {
    .verify-grid {
        grid-template-columns: 1fr;
    }
}

/* Verify Result */
.verify-result {
    margin-top: 15px;
    padding: 15px;
    text-align: center;
}

.verify-result.match {
    background: rgba(119, 221, 119, 0.1);
    border: 1px solid #7d7;
    color: #7d7;
}

.verify-result.no-match {
    background: rgba(170, 85, 85, 0.1);
    border: 1px solid #a55;
    color: #a55;
}

/* Algorithm Section */
.algorithm-section {
    background: #111;
    border: 1px solid #222;
    padding: 20px;
    margin-bottom: 20px;
}

.algorithm-section h3 {
    font-size: 1em;
    font-weight: normal;
    margin-bottom: 15px;
    color: #888;
}

.algorithm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.algo-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    background: #0a0a0a;
    cursor: pointer;
    transition: all 0.2s;
}

.algo-checkbox:hover {
    background: #0d0d0d;
}

.algo-checkbox input:checked + .algo-label {
    color: #7d7;
}

.algo-label {
    font-size: 0.9em;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #888;
}

.algo-tag {
    font-size: 0.7em;
    padding: 2px 6px;
    background: #111;
    color: #666;
}

.algo-tag.recommended {
    background: rgba(119, 221, 119, 0.2);
    color: #7d7;
}

.algo-tag.deprecated {
    background: rgba(170, 85, 85, 0.2);
    color: #a55;
}

.algo-note {
    margin-top: 15px;
    font-size: 0.85em;
    color: #555;
}

/* Hash Results */
.hash-results {
    background: #111;
    border: 1px solid #222;
    padding: 20px;
}

.hash-results h3 {
    font-size: 1em;
    font-weight: normal;
    margin-bottom: 15px;
    color: #888;
}

.hash-output {
    margin-bottom: 15px;
    padding: 15px;
    background: #0a0a0a;
}

.hash-output:last-child {
    margin-bottom: 0;
}

.hash-output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.hash-output-label {
    color: #7d7;
    font-size: 0.9em;
}

.hash-output-value {
    font-family: var(--font-mono);
    font-size: 0.85em;
    word-break: break-all;
    background: #111;
    padding: 10px;
    cursor: pointer;
    transition: all 0.2s;
    color: #e0e0e0;
}

.hash-output-value:hover {
    background: #151515;
}

/* Input Options */
.input-options {
    margin-top: 10px;
    display: flex;
    align-items: center;
}

/* Reference Section */
.reference-section {
    background: #111;
    border: 1px solid #222;
    padding: 20px;
    margin-top: 20px;
}

.reference-section h3 {
    margin-bottom: 15px;
    color: #7d7;
}

.reference-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.reference-item {
    padding: 15px;
    background: #0a0a0a;
}

.reference-item h4 {
    font-size: 0.9em;
    color: #7d7;
    margin-bottom: 10px;
}

.reference-item ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.reference-item li {
    padding: 5px 0;
    font-size: 0.85em;
    color: #666;
}

.reference-item code {
    background: #111;
    padding: 2px 6px;
    font-size: 0.85em;
    color: #7d7;
}

/* Tabs */
.tool-tabs {
    display: flex;
    border-bottom: 1px solid #222;
    margin-bottom: 15px;
}

.tool-tab {
    padding: 10px 15px;
    background: transparent;
    border: none;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    font-family: var(--font-mono);
}

.tool-tab:hover {
    color: #888;
}

.tool-tab.active {
    color: #7d7;
    border-bottom-color: #7d7;
}

.tool-tab-content {
    display: none;
}

.tool-tab-content.active {
    display: block;
}

/* Privacy Notice */
.privacy-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #111;
    border: 1px solid #222;
    font-size: 0.85em;
    color: #666;
    margin-bottom: 20px;
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #222;
    border-top-color: #7d7;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Table Styles */
.tool-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}

.tool-table th,
.tool-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #222;
}

.tool-table th {
    color: #888;
    background: #111;
}

.tool-table td {
    color: #666;
}

.tool-table tr:hover td {
    background: rgba(119, 221, 119, 0.02);
}

/* Strength Meter */
.strength-meter {
    height: 4px;
    background: #111;
    margin-top: 5px;
    overflow: hidden;
}

.strength-meter-fill {
    height: 100%;
    transition: width 0.3s, background 0.3s;
}

.strength-meter-fill.weak { background: #a55; }
.strength-meter-fill.fair { background: #aa7; }
.strength-meter-fill.good { background: #7bd; }
.strength-meter-fill.strong { background: #7d7; }
.strength-meter-fill.very-strong { background: #5d5; }

/* Mobile Responsive */
@media (max-width: 768px) {
    .tool-actions {
        flex-direction: column;
    }

    .tool-actions .btn {
        width: 100%;
    }

    .options-grid {
        grid-template-columns: 1fr;
    }

    .reference-grid {
        grid-template-columns: 1fr;
    }

    .result-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .result-value {
        text-align: left;
    }

    .mode-tabs {
        flex-direction: column;
    }
}
