/* Image Compressor Tool Styles */

.ict-image-compressor-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #1a1a1a;
    line-height: 1.6;
}

.ict-main {
    min-height: 100vh;
    background: linear-gradient(to bottom, #f8f9fa, #e9ecef);
    padding: 3rem 1rem;
}

.ict-container {
    max-width: 1200px;
    margin: 0 auto;
}

.ict-header {
    text-align: center;
    margin-bottom: 3rem;
}

.ict-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #1a1a1a;
}

.ict-description {
    color: #6c757d;
    max-width: 42rem;
    margin: 0 auto;
    font-size: 1rem;
}

.ict-content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
}

/* Card Styles */
.ict-card {
    background: #ffffff;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.ict-card-content {
    padding: 1.5rem;
}

.ict-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e9ecef;
}

.ict-card-title {
    font-size: 1.125rem;
    font-weight: 500;
    margin: 0;
}

/* Dropzone */
.ict-dropzone {
    border: 2px dashed #dee2e6;
    border-radius: 0.5rem;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #ffffff;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.ict-dropzone:hover {
    border-color: #007bff;
    background: #f8f9ff;
}

.ict-dropzone.ict-drag-active {
    border-color: #007bff;
    background: #f0f4ff;
}

.ict-dropzone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.ict-upload-icon {
    width: 40px;
    height: 40px;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.ict-dropzone-text {
    font-weight: 500;
    font-size: 1rem;
    margin: 0;
    color: #1a1a1a;
}

.ict-dropzone-hint {
    font-size: 0.875rem;
    color: #6c757d;
    margin: 0;
}

/* Buttons */
.ict-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.375rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    background: none;
    font-family: inherit;
}

.ict-btn-primary {
    background: #007bff;
    color: #ffffff;
    border-color: #007bff;
}

.ict-btn-primary:hover:not(:disabled) {
    background: #0056b3;
    border-color: #0056b3;
}

.ict-btn-outline {
    background: transparent;
    color: #007bff;
    border-color: #dee2e6;
}

.ict-btn-outline:hover:not(:disabled) {
    background: #f8f9fa;
    border-color: #007bff;
}

.ict-btn-ghost {
    background: transparent;
    color: #6c757d;
    border-color: transparent;
}

.ict-btn-ghost:hover:not(:disabled) {
    background: #f8f9fa;
    color: #1a1a1a;
}

.ict-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ict-btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

.ict-btn-close {
    background: none;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ict-btn-close:hover {
    color: #1a1a1a;
}

.ict-icon {
    width: 16px;
    height: 16px;
    display: inline-block;
}

/* Section Header */
.ict-section-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
    .ict-section-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.ict-section-title {
    flex: 1;
}

.ict-section-heading {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.25rem 0;
}

.ict-section-subtitle {
    color: #6c757d;
    margin: 0;
    font-size: 0.875rem;
}

.ict-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Settings Panel */
.ict-settings-panel {
    margin-bottom: 1.5rem;
}

.ict-settings-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .ict-settings-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.ict-setting-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ict-setting-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ict-setting-label label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #1a1a1a;
}

.ict-setting-value {
    font-size: 0.875rem;
    font-weight: 500;
    color: #007bff;
}

.ict-setting-hint {
    font-size: 0.75rem;
    color: #6c757d;
    margin: 0;
}

/* Slider */
.ict-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #dee2e6;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.ict-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #007bff;
    cursor: pointer;
}

.ict-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #007bff;
    cursor: pointer;
    border: none;
}

/* Switch */
.ict-switch {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.ict-switch input {
    display: none;
}

.ict-switch-slider {
    position: relative;
    width: 44px;
    height: 24px;
    background: #dee2e6;
    border-radius: 12px;
    transition: background 0.3s ease;
}

.ict-switch-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffffff;
    top: 3px;
    left: 3px;
    transition: transform 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.ict-switch input:checked + .ict-switch-slider {
    background: #007bff;
}

.ict-switch input:checked + .ict-switch-slider::before {
    transform: translateX(20px);
}

.ict-switch-label {
    font-size: 0.875rem;
    color: #1a1a1a;
}

/* Stats Card */
.ict-stats-card {
    margin-bottom: 1.5rem;
}

.ict-stats-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.ict-stat-item {
    text-align: center;
    padding: 1rem;
    background: #f0f4ff;
    border-radius: 0.5rem;
}

.ict-stat-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #6c757d;
    margin: 0 0 0.5rem 0;
}

.ict-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}

/* Tabs */
.ict-tabs {
    margin-top: 1.5rem;
}

.ict-tabs-list {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #dee2e6;
}

.ict-tab-btn {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    color: #6c757d;
    transition: all 0.2s ease;
    font-family: inherit;
}

.ict-tab-btn:hover {
    color: #1a1a1a;
}

.ict-tab-btn.active {
    color: #007bff;
    border-bottom-color: #007bff;
}

.ict-tab-content {
    display: none;
}

.ict-tab-content.active {
    display: block;
}

/* Gallery */
.ict-gallery-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .ict-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .ict-gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.ict-gallery-item {
    background: #ffffff;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.ict-gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1rem;
    gap: 0.5rem;
}

.ict-gallery-info {
    flex: 1;
    min-width: 0;
}

.ict-gallery-name {
    font-weight: 500;
    font-size: 0.875rem;
    margin: 0 0 0.25rem 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ict-gallery-size {
    font-size: 0.75rem;
    color: #6c757d;
    margin: 0;
}

.ict-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 9999px;
    white-space: nowrap;
    flex-shrink: 0;
}

.ict-status-pending {
    background: #e9ecef;
    color: #6c757d;
}

.ict-status-processing {
    background: #fff3cd;
    color: #856404;
}

.ict-status-completed {
    background: #d4edda;
    color: #155724;
}

.ict-status-error {
    background: #f8d7da;
    color: #721c24;
}

.ict-gallery-image {
    aspect-ratio: 1;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 1rem;
}

.ict-gallery-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.ict-progress {
    height: 4px;
    background: #e9ecef;
    margin: 1rem;
    border-radius: 2px;
    overflow: hidden;
}

.ict-progress-bar {
    height: 100%;
    background: #007bff;
    transition: width 0.3s ease;
}

.ict-quality-control {
    padding: 0 1rem 1rem;
}

.ict-quality-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.ict-quality-label span:first-child {
    color: #1a1a1a;
}

.ict-quality-label span:last-child {
    font-weight: 500;
    color: #007bff;
}

.ict-gallery-actions {
    display: flex;
    justify-content: space-between;
    padding: 1rem;
    gap: 0.5rem;
}

/* List View */
.ict-list-table {
    background: #ffffff;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.ict-list-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 0.8fr 1.2fr;
    gap: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    font-size: 0.875rem;
    font-weight: 500;
    color: #1a1a1a;
}

.ict-list-body {
    display: flex;
    flex-direction: column;
}

.ict-list-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 0.8fr 1.2fr;
    gap: 1rem;
    padding: 1rem;
    align-items: center;
    border-top: 1px solid #e9ecef;
}

.ict-list-col-name {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    overflow: hidden;
}

.ict-list-thumb {
    width: 32px;
    height: 32px;
    border-radius: 0.25rem;
    overflow: hidden;
    background: #f8f9fa;
    flex-shrink: 0;
}

.ict-list-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ict-list-col-name span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.875rem;
}

.ict-list-col-size,
.ict-list-col-savings {
    text-align: center;
    font-size: 0.875rem;
    color: #1a1a1a;
}

.ict-list-col-actions {
    display: flex;
    justify-content: center;
    gap: 0.25rem;
}

.ict-status-icon {
    display: inline-flex;
    align-items: center;
    margin-left: 0.25rem;
}

/* Empty State */
.ict-empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.ict-empty-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 28rem;
    margin: 0 auto;
}

.ict-empty-icon {
    width: 64px;
    height: 64px;
    color: #6c757d;
    margin-bottom: 1rem;
}

.ict-empty-title {
    font-size: 1.25rem;
    font-weight: 500;
    margin: 0 0 0.5rem 0;
    color: #1a1a1a;
}

.ict-empty-text {
    color: #6c757d;
    margin: 0 0 1.5rem 0;
    font-size: 0.875rem;
}

/* Dialog */
.ict-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.ict-dialog {
    background: #ffffff;
    border-radius: 0.5rem;
    max-width: 28rem;
    width: 90%;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.ict-dialog-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e9ecef;
}

.ict-dialog-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
    color: #1a1a1a;
}

.ict-dialog-content {
    padding: 1.5rem;
}

.ict-dialog-content p {
    margin: 0;
    color: #6c757d;
    font-size: 0.875rem;
}

.ict-dialog-footer {
    padding: 1.5rem;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* Animations */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.ict-spin {
    animation: spin 1s linear infinite;
}

/* Responsive */
@media (max-width: 640px) {
    .ict-title {
        font-size: 2rem;
    }

    .ict-section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .ict-actions {
        width: 100%;
    }

    .ict-actions .ict-btn {
        flex: 1;
        justify-content: center;
    }

    .ict-list-header,
    .ict-list-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .ict-list-col-name,
    .ict-list-col-size,
    .ict-list-col-savings,
    .ict-list-col-actions {
        text-align: left;
    }

    .ict-list-header {
        display: none;
    }
}

/* Elementor Compatibility */
.elementor-widget .ict-image-compressor-wrapper {
    width: 100%;
}

