/* GIF Compressor Tool - Custom Styles */

/* Remove input validation borders */
.toolInput:invalid,
.toolInput:valid {
    border-color: #ced4da !important;
    box-shadow: none !important;
}

.toolInput:focus {
    border-color: #80bdff !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25) !important;
}

/* Drag and Drop Zone */
.drag-drop-zone {
    border: 2px dashed #dee2e6;
    border-radius: 0.5rem;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.drag-drop-zone:hover {
    border-color: #052c65;
    background: #e6f0ff;
}

.drag-drop-zone.drag-over {
    border-color: #052c65 !important;
    background-color: rgba(5, 44, 101, 0.05) !important;
    transform: scale(1.02);
}

[data-bs-theme="dark"] .drag-drop-zone {
    background: #212529;
    border-color: #495057;
}

[data-bs-theme="dark"] .drag-drop-zone:hover {
    border-color: #052c65;
    background: #0a1628;
}

[data-bs-theme="dark"] .drag-drop-zone.drag-over {
    background-color: rgba(5, 44, 101, 0.1) !important;
}

.drag-drop-icon {
    color: #6c757d;
}

.drag-drop-svg {
    width: 48px;
    height: 48px;
    opacity: 0.6;
}

.drag-drop-text {
    font-size: 1.1rem;
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.5rem;
}

.drag-drop-hint {
    font-size: 0.9rem;
    color: #6c757d;
}

[data-bs-theme="dark"] .drag-drop-text {
    color: #e9ecef;
}

[data-bs-theme="dark"] .drag-drop-hint {
    color: #adb5bd;
}

/* Preview Images */
#gifPreview,
#compressedPreview {
    max-width: 100%;
    max-height: 400px;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    display: block;
    margin: 0 auto;
}

[data-bs-theme="dark"] #gifPreview,
[data-bs-theme="dark"] #compressedPreview {
    border-color: #495057;
}

/* Results Display */
.result-item {
    padding: 12px;
    background: var(--bs-secondary-bg);
    border-left: 3px solid #052c65;
    border-radius: 4px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.result-item:hover {
    background: var(--bs-tertiary-bg);
    transform: translateX(2px);
}

.result-label {
    font-weight: 600;
    font-size: 13px;
    color: var(--bs-secondary-color);
    margin-bottom: 6px;
}

.result-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--bs-primary-text-emphasis);
    font-family: 'Courier New', monospace;
}

[data-bs-theme="dark"] .result-item {
    background: rgba(255,255,255,0.05);
    border-left-color: #4a7bc8;
}

[data-bs-theme="dark"] .result-item:hover {
    background: rgba(255,255,255,0.08);
}

/* Processing Status */
.processing-status {
    background: linear-gradient(90deg, #e9ecef 0%, #dee2e6 50%, #e9ecef 100%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

[data-bs-theme="dark"] .processing-status {
    background: linear-gradient(90deg, #343a40 0%, #495057 50%, #343a40 100%);
    background-size: 200% 100%;
}

/* Progress Bar */
.progress-container {
    position: relative;
    height: 4px;
    background-color: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
    margin: 0.5rem 0;
}

.progress-bar {
    height: 100%;
    background-color: #052c65;
    transition: width 0.3s ease;
    border-radius: 2px;
}

[data-bs-theme="dark"] .progress-container {
    background-color: #495057;
}

/* Card Styling */
.card-header h5 {
    user-select: none;
    cursor: default;
}

[data-bs-theme="dark"] .card {
    background-color: #212529;
    border-color: #495057;
}

[data-bs-theme="dark"] .card-header {
    background-color: #1a1d20;
    border-bottom-color: #495057;
    color: #e9ecef;
}

/* Form Controls */
.form-label {
    cursor: default;
}

.form-control {
    cursor: text;
}

.form-control[readonly] {
    cursor: default;
}

.form-select {
    cursor: pointer;
}

.form-range {
    cursor: pointer;
}

input[type="checkbox"],
input[type="radio"] {
    cursor: pointer;
}

input[type="file"] {
    cursor: pointer;
}

.form-check-label {
    cursor: pointer;
}

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

[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .toolOutput,
[data-bs-theme="dark"] .form-select {
    background-color: #212529;
    border-color: #495057;
    color: #e9ecef;
}

[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .toolOutput:focus,
[data-bs-theme="dark"] .form-select:focus {
    background-color: #1a1d20;
    border-color: #052c65;
    color: #e9ecef;
}

[data-bs-theme="dark"] .form-control[readonly],
[data-bs-theme="dark"] .toolOutput[readonly] {
    background-color: #1a1d20;
    color: #adb5bd;
}

/* Dark Mode Text Elements */
[data-bs-theme="dark"] small.text-muted {
    color: #adb5bd !important;
}

[data-bs-theme="dark"] .form-text {
    color: #adb5bd !important;
}

/* Alert Styling */
.alert-info {
    background-color: #e6f0ff;
    border-color: #052c65;
    color: #052c65;
}

[data-bs-theme="dark"] .alert-info {
    background-color: #0a1628;
    border-color: #1e4a8a;
    color: #93c5fd;
}

/* Spinner */
.spinner-border {
    border-color: rgba(5, 44, 101, 0.2);
    border-right-color: #052c65;
    width: 1.5rem;
    height: 1.5rem;
}

[data-bs-theme="dark"] .spinner-border {
    border-color: rgba(147, 197, 253, 0.2);
    border-right-color: #93c5fd;
}

/* Button Icons */
.btn img {
    transition: all 0.2s ease;
}

.btn:hover img {
    transform: scale(1.1);
}

[data-bs-theme="dark"] .btn-success {
    background-color: #198754;
    border-color: #198754;
}

[data-bs-theme="dark"] .btn-success:hover {
    background-color: #157347;
    border-color: #146c43;
}

[data-bs-theme="dark"] .btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
}

[data-bs-theme="dark"] .btn-secondary:hover {
    background-color: #5c636a;
    border-color: #565e64;
}

/* Download Button */
#downloadLink {
    color: white !important;
    text-decoration: none !important;
}

#downloadLink[href]:not([href="#"]):not([href=""]) {
    display: inline-block !important;
}

#downloadLink:hover,
#downloadLink:focus,
#downloadLink:active {
    color: white !important;
    text-decoration: none !important;
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* Responsive */
@media (max-width: 768px) {
    .drag-drop-zone {
        padding: 1.5rem;
    }

    .drag-drop-svg {
        width: 40px;
        height: 40px;
    }

    .drag-drop-text {
        font-size: 1rem;
    }

    #gifPreview,
    #compressedPreview {
        max-height: 300px;
    }

    .result-item {
        padding: 10px;
    }

    .result-label {
        font-size: 12px;
    }

    .result-value {
        font-size: 13px;
    }
}

/* File Size Badge */
.file-size-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.file-size-small {
    background-color: #d4edda;
    color: #155724;
}

.file-size-medium {
    background-color: #fff3cd;
    color: #856404;
}

.file-size-large {
    background-color: #f8d7da;
    color: #721c24;
}

[data-bs-theme="dark"] .file-size-small {
    background-color: #1e4620;
    color: #75b798;
}

[data-bs-theme="dark"] .file-size-medium {
    background-color: #664d03;
    color: #ffecb5;
}

[data-bs-theme="dark"] .file-size-large {
    background-color: #58151c;
    color: #f1aeb5;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.empty-state img {
    width: 80px;
    height: 80px;
    opacity: 0.3;
    margin-bottom: 1rem;
}

[data-bs-theme="dark"] .empty-state {
    color: #adb5bd;
}

[data-bs-theme="dark"] .empty-state img {
    filter: brightness(0) invert(1);
}
