/* MD5 Hash Generator Styles */

/* Tab Navigation */
.tab-btn {
    color: #6b7280;
    background-color: transparent;
    border: none;
    cursor: pointer;
}

.tab-btn:hover {
    background-color: #f3f4f6;
    color: #374151;
}

.tab-btn.active {
    background-color: #3b82f6;
    color: white;
}

.tab-btn.active:hover {
    background-color: #2563eb;
}

/* Tab Panel Display */
.tab-panel {
    display: block;
}

.tab-panel.hidden {
    display: none;
}

/* Hash Output Styles */
.hash-output {
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    padding: 0.75rem;
    font-family: "Monaco", "Menlo", "Ubuntu Mono", monospace;
    font-size: 0.875rem;
    word-break: break-all;
    line-height: 1.5;
}

.hash-output.success {
    background-color: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}

.hash-output.error {
    background-color: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

/* Verification Status */
.verification-status {
    padding: 0.75rem;
    border-radius: 0.375rem;
    font-weight: 500;
    text-align: center;
}

.verification-status.valid {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.verification-status.invalid {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Batch Results Table */
.batch-results-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.batch-results-table th,
.batch-results-table td {
    padding: 0.5rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.batch-results-table th {
    background-color: #f9fafb;
    font-weight: 600;
    color: #374151;
}

.batch-results-table td {
    font-size: 0.875rem;
}

.batch-results-table .hash-cell {
    font-family: "Monaco", "Menlo", "Ubuntu Mono", monospace;
    font-size: 0.75rem;
    word-break: break-all;
    max-width: 200px;
}

.batch-results-table .error-cell {
    color: #991b1b;
    font-style: italic;
}

.batch-results-table .success-row {
    background-color: #f0fdf4;
}

.batch-results-table .error-row {
    background-color: #fef2f2;
}

/* Comparison Results */
.comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.comparison-card {
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1rem;
}

.comparison-card h4 {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #374151;
}

.comparison-card .hash-preview {
    font-family: "Monaco", "Menlo", "Ubuntu Mono", monospace;
    font-size: 0.75rem;
    color: #6b7280;
    word-break: break-all;
    background-color: white;
    padding: 0.5rem;
    border-radius: 0.25rem;
    margin-bottom: 0.5rem;
}

.match-indicator {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.match-indicator.match {
    background-color: #dcfce7;
    color: #166534;
}

.match-indicator.no-match {
    background-color: #fee2e2;
    color: #991b1b;
}

/* File Upload Styles */
.file-drop-zone {
    transition: all 0.3s ease;
}

.file-drop-zone.dragover {
    border-color: #3b82f6;
    background-color: #eff6ff;
}

/* Metadata Display */
.metadata-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.metadata-card {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 1rem;
}

.metadata-card h4 {
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #1e293b;
    font-size: 0.875rem;
}

.metadata-list {
    space-y: 0.25rem;
}

.metadata-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #64748b;
}

.metadata-item .label {
    font-weight: 500;
}

.metadata-item .value {
    font-family: "Monaco", "Menlo", "Ubuntu Mono", monospace;
}

/* Statistics Display */
.stats-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
    padding: 1rem;
    background-color: #f8fafc;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
}

.stat-item {
    text-align: center;
    flex: 1;
    min-width: 100px;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1;
}

.stat-label {
    display: block;
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Progress Indicators */
.progress-bar {
    width: 100%;
    height: 0.5rem;
    background-color: #e5e7eb;
    border-radius: 0.25rem;
    overflow: hidden;
    margin: 0.5rem 0;
}

.progress-fill {
    height: 100%;
    background-color: #3b82f6;
    transition: width 0.3s ease;
}

.progress-fill.success {
    background-color: #10b981;
}

.progress-fill.error {
    background-color: #ef4444;
}

/* Copy Button Animation */
.copy-btn-success {
    background-color: #10b981 !important;
    animation: copySuccess 0.3s ease;
}

@keyframes copySuccess {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Responsive Adjustments */
@media (max-width: 640px) {
    .batch-results-table {
        font-size: 0.75rem;
    }

    .batch-results-table .hash-cell {
        font-size: 0.625rem;
        max-width: 150px;
    }

    .metadata-grid {
        grid-template-columns: 1fr;
    }

    .stats-container {
        flex-direction: column;
        gap: 0.5rem;
    }

    .stat-item {
        min-width: auto;
    }
}

/* Loading States */
.loading-input {
    background-color: #f9fafb;
    color: #9ca3af;
    cursor: not-allowed;
}

.loading-button {
    background-color: #9ca3af !important;
    cursor: not-allowed;
}

.loading-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Error States */
.input-error {
    border-color: #ef4444 !important;
    background-color: #fef2f2;
}

.error-message {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
}

.error-message::before {
    content: "⚠";
    margin-right: 0.5rem;
}

/* Success States */
.success-message {
    color: #10b981;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
}

.success-message::before {
    content: "✓";
    margin-right: 0.5rem;
    font-weight: bold;
}

/* Tooltip Styles */
.tooltip {
    position: relative;
    cursor: help;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #1f2937;
    color: white;
    padding: 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 1000;
}

.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Hash Comparison Visual */
.hash-match-visual {
    font-family: "Monaco", "Menlo", "Ubuntu Mono", monospace;
    font-size: 0.75rem;
    line-height: 1.5;
    white-space: pre-wrap;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.25rem;
    padding: 0.5rem;
    margin: 0.5rem 0;
}

.hash-char-match {
    background-color: #dcfce7;
    color: #166534;
}

.hash-char-diff {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Advanced Options Toggle */
.advanced-options {
    border-top: 1px solid #e5e7eb;
    margin-top: 1rem;
    padding-top: 1rem;
}

.advanced-toggle {
    color: #3b82f6;
    font-size: 0.875rem;
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
}

.advanced-toggle:hover {
    color: #2563eb;
}

.advanced-toggle::after {
    content: "▼";
    margin-left: 0.5rem;
    transition: transform 0.2s ease;
    font-size: 0.75rem;
}

.advanced-toggle.collapsed::after {
    transform: rotate(-90deg);
}

/* Print Styles */
@media print {
    .tab-btn,
    button,
    .advanced-toggle {
        display: none !important;
    }

    .tab-panel.hidden {
        display: block !important;
    }

    .hash-output,
    .verification-status,
    .metadata-card {
        border: 1px solid #000 !important;
        background-color: transparent !important;
    }
}
