/* AI Text Summarizer Tool Styles */

/* Summary Container */
#summaryContainer {
    animation: fadeIn 0.4s ease;
}

/* Statistics Grid */
#statsContainer {
    animation: fadeIn 0.5s ease;
}

#statsContainer .col-md-3 {
    margin-bottom: 1rem;
}

/* Compression Ratio Styling */
#compressionRatio {
    font-weight: 600;
    font-size: 1.1rem;
}

/* Alert styling */
.alert {
    border-radius: 8px;
    border-left: 4px solid;
}

.alert-success {
    border-left-color: #198754;
}

.alert-warning {
    border-left-color: #ffc107;
}

.alert-info {
    border-left-color: #0dcaf0;
}

.alert-danger {
    border-left-color: #dc3545;
}

/* Card styling */
.card {
    border-radius: 10px;
    border: 1px solid #dee2e6;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

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

/* Prevent text selection on labels */
.form-label {
    cursor: default;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.form-text {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    cursor: default;
}

small.text-muted {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    cursor: default;
}

/* Spinner enhancement */
.spinner-border {
    border-width: 3px;
}

/* Loading Status with Progress */
#loadingStatus {
    position: relative;
    overflow: hidden;
}

#loadingStatus::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: loading-slide 1.5s infinite;
}

@keyframes loading-slide {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Icon colors */
.fsvg {
    transition: filter 0.2s ease;
}

/* Button hover effects - prevent filter on white icons */
.btn .filter-white {
    filter: brightness(0) invert(1);
}

.btn:hover .filter-white {
    filter: brightness(0) invert(1);
}

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

[data-bs-theme="dark"] .btn:hover .filter-white {
    filter: brightness(0) invert(1);
}

/* Textarea enhancements */
.toolInput, .toolOutput {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.toolInput:focus, .toolOutput:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

/* Select styling */
.form-select {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-select:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

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

/* Smooth transitions */
.form-group,
.alert,
.card {
    transition: all 0.3s ease;
}

/* Output highlighting */
.toolOutput {
    background-color: #f8f9fa;
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .row {
        margin-left: 0;
        margin-right: 0;
    }
    
    .row > [class*='col-'] {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    #statsContainer .col-md-3 {
        margin-bottom: 0.75rem;
    }
}

@media (max-width: 576px) {
    #compressionRatio {
        font-size: 1rem;
    }
    
    .btn {
        font-size: 0.9rem;
        padding: 0.5rem 0.8rem;
    }
    
    .btn img {
        height: 16px;
        width: 16px;
    }
    
    #statsContainer .col-md-3 {
        margin-bottom: 0.5rem;
    }
}

/* Print styles */
@media print {
    .btn, .form-select {
        display: none !important;
    }
    
    .toolInput {
        border: 1px solid #000;
    }
    
    .toolOutput {
        background-color: #fff;
        border: 2px solid #000;
    }
}