/* SHA-1 Hash Generator Styling */

/* Textarea Styling */
.hash-textarea {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    tab-size: 2;
    resize: vertical;
}

.hash-output {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.5px;
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    padding: 12px;
    color: #052c65;
}

.hash-output:focus {
    background: #ffffff;
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Hash Info Container */
.hash-info-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 16px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
}

.hash-info-item {
    display: flex;
    flex-direction: column;
    min-width: 150px;
}

.hash-info-label {
    font-size: 12px;
    color: #6c757d;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.hash-info-value {
    font-size: 18px;
    font-weight: 600;
    color: #212529;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

/* Dark Mode */
[data-bs-theme="dark"] .hash-textarea,
[data-bs-theme="dark"] .hash-output {
    background-color: #212529;
    border-color: #495057;
    color: #e9ecef;
}

[data-bs-theme="dark"] .hash-output {
    color: #6ea8fe;
}

[data-bs-theme="dark"] .hash-textarea:focus,
[data-bs-theme="dark"] .hash-output:focus {
    background-color: #212529;
    border-color: #86b7fe;
    color: #e9ecef;
}

[data-bs-theme="dark"] .hash-info-container {
    background: #1a1d23;
    border-color: #343a40;
}

[data-bs-theme="dark"] .hash-info-label {
    color: #9ca3af;
}

[data-bs-theme="dark"] .hash-info-value {
    color: #e9ecef;
}

/* Status Message */
#statusMessage {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#statusContent {
    margin-bottom: 0;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
}

/* Alert Colors */
.alert-success {
    background-color: #d1e7dd;
    border-color: #badbcc;
    color: #0f5132;
}

.alert-danger {
    background-color: #f8d7da;
    border-color: #f5c2c7;
    color: #842029;
}

.alert-info {
    background-color: #cff4fc;
    border-color: #b6effb;
    color: #055160;
}

[data-bs-theme="dark"] .alert-success {
    background-color: #0f5132;
    border-color: #146c43;
    color: #d1e7dd;
}

[data-bs-theme="dark"] .alert-danger {
    background-color: #842029;
    border-color: #a52834;
    color: #f8d7da;
}

[data-bs-theme="dark"] .alert-info {
    background-color: #055160;
    border-color: #087990;
    color: #cff4fc;
}

/* Button Styling */
.toolBtn {
    transition: all 0.2s ease;
    border-radius: 6px;
    font-weight: 500;
    padding: 8px 16px;
}

.toolBtn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.toolBtn:active {
    transform: translateY(0);
}

/* Form Controls Dark Mode */
[data-bs-theme="dark"] .form-select {
    background-color: #212529;
    border-color: #495057;
    color: #e9ecef;
}

[data-bs-theme="dark"] .form-select:focus {
    background-color: #212529;
    border-color: #86b7fe;
    color: #e9ecef;
}

/* Ensure form labels have proper color */
.form-group label {
    color: #212529;
}

[data-bs-theme="dark"] .form-group label {
    color: #e9ecef;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hash-info-container {
        gap: 12px;
        padding: 12px;
    }

    .hash-info-item {
        min-width: 120px;
    }

    .hash-info-label {
        font-size: 11px;
    }

    .hash-info-value {
        font-size: 16px;
    }

    .toolBtn {
        width: 100%;
        margin-bottom: 5px;
    }

    .hash-textarea {
        font-size: 13px;
    }

    .hash-output {
        font-size: 14px;
    }
}

/* Loading Animation */
.toolBtn.loading {
    position: relative;
    pointer-events: none;
}

.toolBtn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.6s linear infinite;
}

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

/* Focus States */
.hash-textarea:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Placeholder Styling */
.hash-textarea::placeholder {
    color: #6c757d;
    opacity: 0.7;
}

[data-bs-theme="dark"] .hash-textarea::placeholder {
    color: #9ca3af;
    opacity: 0.8;
}
