/**
 * Hash Generator Tool Styles
 * Extends main.css with tool-specific styling
 */

.hash-generator-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Input Section */
.input-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.input-label {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
}

.textarea-wrapper {
    position: relative;
}

.hash-textarea {
    width: 100%;
    padding: 1rem;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;
    font-size: 0.95rem;
    line-height: 1.6;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
    color: #1f2937;
    resize: vertical;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.hash-textarea:focus {
    outline: none;
    border-color: var(--primary-color, #3b82f6);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.hash-textarea::placeholder {
    color: var(--text-muted, #6b7280);
    opacity: 0.6;
}

/* Options Container */
.options-container {
    padding: 1.25rem;
    background: #f8f9fa;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.options-title {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
}

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

.option-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
}

.option-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color, #3b82f6);
}

.checkbox-label {
    font-size: 0.95rem;
    color: #1f2937;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.generate-btn,
.btn-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.generate-btn {
    background: var(--primary-color, #3b82f6);
    color: white;
    flex: 1;
}

.generate-btn:hover {
    background: var(--primary-dark, #2563eb);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-clear {
    background: #f3f4f6;
    color: #1f2937;
    border: 2px solid #e5e7eb;
}

.btn-clear:hover {
    background: #e5e7eb;
    border-color: #6b7280;
}

/* Output Container */
.output-container {
    margin-top: 1rem;
}

.output-title {
    margin: 0 0 1.25rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
}

/* Hashes List */
.hashes-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hash-item {
    padding: 1.25rem;
    background: #f8f9fa;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: border-color 0.2s ease;
}

.hash-item:hover {
    border-color: var(--primary-color, #3b82f6);
}

.hash-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.hash-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary-color, #3b82f6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-copy-hash {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    font-size: 0.875rem;
    font-weight: 600;
    background: var(--success-color, #10b981);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-copy-hash:hover {
    background: var(--success-dark, #059669);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.hash-value {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
    word-break: break-all;
    color: #1f2937;
    padding: 0.75rem;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
}

/* Copy Notification */
.copy-notification {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    background: var(--success-color, #10b981);
    color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-weight: 600;
    z-index: 1000;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .options-grid {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        flex-direction: column;
    }

    .generate-btn,
    .btn-clear {
        width: 100%;
    }

    .hash-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .btn-copy-hash {
        width: 100%;
        justify-content: center;
    }

    .copy-notification {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
    }
}

/* Dark Theme Support - System Preference */
@media (prefers-color-scheme: dark) {
    .input-label,
    .options-title,
    .output-title {
        color: #e2e8f0;
    }

    .hash-textarea {
        background: #1e293b;
        border-color: #334155;
        color: #e2e8f0;
    }

    .hash-textarea::placeholder {
        color: #94a3b8;
    }

    .options-container {
        background: #1e293b;
        border-color: #334155;
    }

    .checkbox-label {
        color: #e2e8f0;
    }

    .btn-clear {
        background: #1e293b;
        border-color: #334155;
        color: #e2e8f0;
    }

    .btn-clear:hover {
        background: #334155;
        border-color: #475569;
    }

    .hash-item {
        background: #1e293b;
        border-color: #334155;
    }

    .hash-value {
        background: #0f172a;
        border-color: #334155;
        color: #e2e8f0;
    }
}

/* Light Theme Specific (when explicitly set) */
[data-theme="light"] .input-label,
[data-theme="light"] .options-title,
[data-theme="light"] .output-title {
    color: #1f2937;
}

[data-theme="light"] .hash-textarea {
    background: #ffffff;
    border-color: #e5e7eb;
    color: #1f2937;
}

[data-theme="light"] .hash-textarea::placeholder {
    color: #6b7280;
}

[data-theme="light"] .options-container {
    background: #f8f9fa;
    border-color: #e5e7eb;
}

[data-theme="light"] .checkbox-label {
    color: #1f2937;
}

[data-theme="light"] .btn-clear {
    background: #f3f4f6;
    border-color: #e5e7eb;
    color: #1f2937;
}

[data-theme="light"] .btn-clear:hover {
    background: #e5e7eb;
    border-color: #6b7280;
}

[data-theme="light"] .hash-item {
    background: #f8f9fa;
    border-color: #e5e7eb;
}

[data-theme="light"] .hash-value {
    background: #ffffff;
    border-color: #e5e7eb;
    color: #1f2937;
}

/* Dark Theme Specific (when explicitly set) */
[data-theme="dark"] .input-label,
[data-theme="dark"] .options-title,
[data-theme="dark"] .output-title {
    color: #e2e8f0;
}

[data-theme="dark"] .hash-textarea {
    background: #1e293b;
    border-color: #334155;
    color: #e2e8f0;
}

[data-theme="dark"] .hash-textarea::placeholder {
    color: #94a3b8;
}

[data-theme="dark"] .options-container {
    background: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .checkbox-label {
    color: #e2e8f0;
}

[data-theme="dark"] .btn-clear {
    background: #1e293b;
    border-color: #334155;
    color: #e2e8f0;
}

[data-theme="dark"] .btn-clear:hover {
    background: #334155;
    border-color: #475569;
}

[data-theme="dark"] .hash-item {
    background: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .hash-value {
    background: #0f172a;
    border-color: #334155;
    color: #e2e8f0;
}
