/**
 * استایل ابزار تبدیل به WebP
 */

/* تب‌های WebP */
.novin-webp-tabs {
    display: flex !important;
    gap: 12px !important;
    margin-bottom: 24px !important;
    border-bottom: 2px solid #e9ecef !important;
    padding: 0 !important;
    list-style: none !important;
}

.novin-webp-tab {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 12px 24px !important;
    background: transparent !important;
    border: none !important;
    border-bottom: 3px solid transparent !important;
    color: #6c757d !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    margin-bottom: -2px !important;
    margin: 0 0 -2px 0 !important;
    text-decoration: none !important;
    box-shadow: none !important;
}

.novin-webp-tab:hover {
    color: #7043f2 !important;
    background: rgba(112, 67, 242, 0.05) !important;
    text-decoration: none !important;
}

.novin-webp-tab.active {
    color: #7043f2 !important;
    border-bottom-color: #7043f2 !important;
    background: transparent !important;
}

.novin-webp-tab svg {
    width: 20px !important;
    height: 20px !important;
}

.novin-webp-tab-content {
    display: none !important;
}

.novin-webp-tab-content.active {
    display: block !important;
}

/* Range Slider بهبود یافته */
.novin-range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right,
            rgba(112, 67, 242, 0.2) 0%,
            rgba(112, 67, 242, 0.2) 80%,
            #e9ecef 80%,
            #e9ecef 100%);
    outline: none;
    cursor: pointer;
}

.novin-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #7043f2;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(112, 67, 242, 0.4);
    transition: all 0.2s ease;
}

.novin-range::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 8px rgba(112, 67, 242, 0.6);
}

.novin-range::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #7043f2;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(112, 67, 242, 0.4);
    transition: all 0.2s ease;
}

.novin-range::-moz-range-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 8px rgba(112, 67, 242, 0.6);
}

.novin-range::-moz-range-track {
    height: 8px;
    border-radius: 4px;
    background: transparent;
}

.novin-webp-converter .novin-upload-area {
    position: relative;
    padding: 60px 20px;
    background: #f8f9fa;
    border: 3px dashed #dee2e6;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.novin-upload-area:hover {
    background: #e9ecef;
    border-color: #7043f2;
}

.novin-upload-area.dragover {
    background: rgba(112, 67, 242, 0.1);
    border-color: #7043f2;
}

.novin-upload-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    color: #7043f2;
}

.novin-upload-text {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px 0;
}

.novin-upload-hint {
    font-size: 14px;
    color: #6c757d;
    margin: 0;
}

.novin-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
}

.novin-quality-slider {
    margin: 20px 0;
}

.novin-quality-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.novin-quality-value {
    color: #7043f2;
    font-size: 18px;
}

.novin-webp-result {
    margin-top: 30px;
}

.novin-comparison {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.novin-image-box {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    text-align: center;
}

.novin-image-box h4 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 16px 0;
}

.novin-preview-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.novin-image-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
}

.novin-info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    background: #ffffff;
    border-radius: 6px;
}

.novin-info-label {
    color: #6c757d;
}

.novin-info-value {
    font-weight: 600;
    color: #333;
}

.novin-savings-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #d1fae5;
    color: #065f46;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin-top: 12px;
}

.novin-savings-badge svg {
    width: 18px;
    height: 18px;
}

/* Selected Files List */
.novin-selected-files {
    margin: 20px 0;
}

.novin-files-list h4 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 16px 0;
}

.novin-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 16px;
}

.novin-preview-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.novin-preview-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.novin-preview-thumb {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

.novin-preview-info {
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.novin-preview-name {
    font-size: 12px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.novin-preview-size {
    font-size: 11px;
    color: #6c757d;
}

/* Progress Bar */
.novin-progress-container {
    text-align: center;
    padding: 20px;
}

.novin-upload-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
    padding: 12px;
    background: #f0f7ff;
    border-radius: 8px;
    border: 1px solid #d0e7ff;
}

.novin-status-text {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #1e40af;
}

.novin-spinner-small {
    width: 20px;
    height: 20px;
    border: 3px solid #d0e7ff;
    border-top-color: #7043f2;
    border-radius: 50%;
    animation: novin-spin 0.8s linear infinite;
}

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

.novin-progress-container p {
    margin: 0 0 12px 0;
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.novin-progress-bar {
    width: 100%;
    height: 32px;
    background: #e9ecef;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 12px;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.novin-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #7043f2, #9d6fff);
    transition: width 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-width: 40px;
}

.novin-progress-percent {
    color: white;
    font-size: 13px;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.novin-progress-text {
    font-size: 14px;
    color: #6c757d;
}

/* Multiple Results Grid */
.novin-multiple-results h3 {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0 0 20px 0;
    text-align: center;
}

.novin-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.novin-result-item {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 16px;
    border: 1px solid #dee2e6;
}

.novin-result-header h4 {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin: 0 0 12px 0;
    word-break: break-word;
}

.novin-comparison-mini {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.novin-image-box-mini {
    text-align: center;
}

.novin-preview-image-mini {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 8px;
}

.novin-image-info-mini {
    font-size: 12px;
    color: #6c757d;
}

.novin-savings-badge-mini {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: #d1fae5;
    color: #065f46;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-top: 4px;
}

.novin-savings-badge-mini svg {
    width: 14px;
    height: 14px;
}

.novin-btn-sm {
    width: 100%;
    padding: 8px 12px;
    font-size: 13px;
}

@media (max-width: 768px) {
    .novin-upload-area {
        padding: 40px 20px;
    }

    .novin-upload-icon {
        width: 48px;
        height: 48px;
    }

    .novin-upload-text {
        font-size: 16px;
    }

    .novin-comparison {
        grid-template-columns: 1fr;
    }

    .novin-results-grid {
        grid-template-columns: 1fr;
    }

    .novin-comparison-mini {
        grid-template-columns: 1fr;
    }

    .novin-preview-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 8px;
        padding: 12px;
    }

    .novin-preview-thumb {
        height: 100px;
    }
}