/* PERC Image Compressor Styles */
@import url('https://fonts.googleapis.com/css2?family=Questrial&display=swap');

.perc-image-compressor {
    font-family: 'Questrial', sans-serif;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(3, 66, 146, 0.1);
}

/* Header */
.perc-header {
    text-align: center;
    margin-bottom: 30px;
}

.perc-header h2 {
    color: #034292;
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 400;
}

.perc-header p {
    color: #666;
    font-size: 1.1rem;
    margin: 0;
}

/* Settings */
.perc-settings {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 25px;
    border: 1px solid #e9ecef;
}

.perc-setting-group {
    margin-bottom: 20px;
}

.perc-setting-group:last-child {
    margin-bottom: 0;
}

.perc-setting-group label {
    display: block;
    color: #034292;
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 1rem;
}

/* Quality Controls */
.perc-quality-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.perc-quality-slider {
    flex: 1;
    min-width: 150px;
    height: 6px;
    border-radius: 3px;
    background: #e9ecef;
    outline: none;
    -webkit-appearance: none;
}

.perc-quality-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #f15d21;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(241, 93, 33, 0.3);
}

.perc-quality-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #f15d21;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(241, 93, 33, 0.3);
}

.perc-quality-presets {
    display: flex;
    gap: 8px;
}

.perc-preset {
    padding: 6px 12px;
    border: 1px solid #034292;
    background: transparent;
    color: #034292;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Questrial', sans-serif;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.perc-preset:hover {
    background: #034292;
    color: white;
}

.perc-preset.active {
    background: #034292;
    color: white;
}

.perc-quality-value {
    font-weight: 600;
    color: #f15d21;
    min-width: 20px;
    text-align: center;
}

/* Width Input */
.perc-width-input {
    width: 120px;
    padding: 8px 12px;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    font-family: 'Questrial', sans-serif;
    font-size: 1rem;
    color: #034292;
}

.perc-width-input:focus {
    outline: none;
    border-color: #f15d21;
    box-shadow: 0 0 0 2px rgba(241, 93, 33, 0.2);
}

.perc-aspect-ratio {
    display: block;
    color: #666;
    font-size: 0.9rem;
    margin-top: 5px;
}

/* Upload Area */
.perc-upload-area {
    border: 2px dashed #034292;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    background: #f8f9fa;
    transition: all 0.3s ease;
    cursor: pointer;
    margin-bottom: 20px;
}

.perc-upload-area:hover {
    border-color: #f15d21;
    background: #fff5f2;
}

.perc-upload-area.dragover {
    border-color: #f15d21;
    background: #fff5f2;
    transform: scale(1.02);
}

.perc-upload-content {
    pointer-events: none;
}

.perc-upload-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #034292;
}

.perc-upload-area h3 {
    color: #034292;
    margin-bottom: 10px;
    font-size: 1.5rem;
    font-weight: 400;
}

.perc-upload-area p {
    color: #666;
    margin: 5px 0;
    font-size: 1rem;
}

.perc-upload-limits {
    color: #f15d21;
    font-size: 0.9rem;
    font-weight: 500;
}

/* File List */
.perc-file-list {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

.perc-file-list h3 {
    color: #034292;
    margin-bottom: 15px;
    font-size: 1.3rem;
    font-weight: 400;
}

.perc-files {
    margin-bottom: 20px;
}

.perc-file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: white;
    border-radius: 6px;
    margin-bottom: 8px;
    border: 1px solid #e9ecef;
}

.perc-file-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.perc-file-icon {
    font-size: 1.5rem;
    color: #034292;
}

.perc-file-details h4 {
    margin: 0 0 4px 0;
    color: #034292;
    font-size: 1rem;
    font-weight: 500;
}

.perc-file-details p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

.perc-file-size {
    color: #f15d21;
    font-weight: 500;
}

.perc-remove-file {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 10px;
    cursor: pointer;
    font-family: 'Questrial', sans-serif;
    font-size: 0.9rem;
    transition: background 0.2s ease;
}

.perc-remove-file:hover {
    background: #c82333;
}

/* Buttons */
.perc-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.perc-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Questrial', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.perc-btn-primary {
    background: #034292;
    color: white;
}

.perc-btn-primary:hover {
    background: #023a7a;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(3, 66, 146, 0.3);
}

.perc-btn-secondary {
    background: #6c757d;
    color: white;
}

.perc-btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
}

.perc-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Progress */
.perc-progress {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

.perc-progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.perc-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #034292, #f15d21);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.perc-progress-text {
    text-align: center;
    color: #034292;
    font-weight: 500;
}

/* Results */
.perc-results {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.perc-results h3 {
    color: #034292;
    margin-bottom: 15px;
    font-size: 1.3rem;
    font-weight: 400;
}

.perc-result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background: white;
    border-radius: 6px;
    margin-bottom: 10px;
    border: 1px solid #e9ecef;
}

.perc-result-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.perc-result-icon {
    font-size: 1.5rem;
    color: #28a745;
}

.perc-result-details h4 {
    margin: 0 0 4px 0;
    color: #034292;
    font-size: 1rem;
    font-weight: 500;
}

.perc-result-details p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

.perc-compression-info {
    color: #28a745;
    font-weight: 500;
}

.perc-download-btn {
    background: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    cursor: pointer;
    font-family: 'Questrial', sans-serif;
    font-size: 0.9rem;
    transition: background 0.2s ease;
}

.perc-download-btn:hover {
    background: #218838;
}

.perc-download-all {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

/* Responsive Design */
@media (max-width: 768px) {
    .perc-image-compressor {
        padding: 15px;
    }
    
    .perc-header h2 {
        font-size: 2rem;
    }
    
    .perc-quality-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .perc-quality-presets {
        justify-content: center;
    }
    
    .perc-actions {
        flex-direction: column;
    }
    
    .perc-file-item,
    .perc-result-item {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .perc-file-info,
    .perc-result-info {
        justify-content: center;
    }
}

/* Loading Animation */
.perc-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #034292;
    border-radius: 50%;
    animation: perc-spin 1s linear infinite;
}

@keyframes perc-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error States */
.perc-error {
    background: #f8d7da;
    color: #721c24;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 15px;
    border: 1px solid #f5c6cb;
}

.perc-success {
    background: #d4edda;
    color: #155724;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 15px;
    border: 1px solid #c3e6cb;
} 