/**
 * ImageType.css - Image Type Converter Styles
 * Basic Calculator Online
 */

/* ======================= PAGE HEADER ======================= */
.page-header-section {
    position: relative;
    padding: 7rem 0 4rem;
    background: linear-gradient(135deg, #0891b2 0%, #06b6d4 50%, #22d3ee 100%);
    overflow: hidden;
}

.page-header-bg {
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.breadcrumb-nav {
    margin-bottom: 1.5rem;
}

.breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
}

.breadcrumb-item a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: #fff;
}

.breadcrumb-item.active {
    color: rgba(255, 255, 255, 0.9);
}

.breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.5);
}

.page-header-content {
    position: relative;
    z-index: 2;
}

.page-title {
    font-size: 2.75rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.75rem;
}

.page-subtitle {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

/* ======================= TOOL SECTION ======================= */
.tool-section {
    padding: 3rem 0 5rem;
    background: var(--bg-body);
}

/* ======================= QUICK CONVERT ======================= */
.quick-convert-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.quick-convert-label {
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

.quick-convert-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.quick-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.quick-btn:hover {
    border-color: #06b6d4;
    background: rgba(6, 182, 212, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.15);
}

.quick-btn.active {
    background: linear-gradient(135deg, #0891b2 0%, #06b6d4 100%);
    border-color: transparent;
    color: #fff;
}

.quick-btn .from-format {
    color: var(--text-muted);
}

.quick-btn .to-format {
    color: #0891b2;
    font-weight: 700;
}

.quick-btn.active .from-format,
.quick-btn.active .to-format {
    color: #fff;
}

.quick-btn i {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.quick-btn.active i {
    color: #fff;
}

/* ======================= UPLOAD CARD ======================= */
.upload-card {
    background: #fff;
    border-radius: 1.25rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.upload-area {
    padding: 4rem 2rem;
    border: 2px dashed #d1d5db;
    border-radius: 1rem;
    margin: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafafa;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: #06b6d4;
    background: rgba(6, 182, 212, 0.05);
}

.upload-area.dragover {
    transform: scale(1.01);
}

.upload-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #cffafe 0%, #a5f3fc 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.upload-icon i {
    font-size: 2.5rem;
    color: #0891b2;
}

.upload-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.upload-content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.upload-formats {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ======================= IMAGES CARD ======================= */
.images-card {
    background: #fff;
    border-radius: 1.25rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    overflow: hidden;
    margin-top: 1.5rem;
}

.images-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #0891b2 0%, #06b6d4 100%);
    color: #fff;
}

.images-header h5 {
    margin: 0;
    font-weight: 600;
}

.images-actions {
    display: flex;
    gap: 0.5rem;
}

.images-actions .btn {
    background: rgba(255, 255, 255, 0.2);
    border-color: transparent;
    color: #fff;
}

.images-actions .btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.images-body {
    padding: 1rem;
    max-height: 400px;
    overflow-y: auto;
}

.images-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.image-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.image-item:hover {
    border-color: #06b6d4;
    box-shadow: 0 2px 8px rgba(6, 182, 212, 0.1);
}

.image-item-preview {
    width: 60px;
    height: 60px;
    border-radius: 0.5rem;
    overflow: hidden;
    flex-shrink: 0;
    background: #e2e8f0;
}

.image-item-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-item-info {
    flex: 1;
    min-width: 0;
}

.image-item-name {
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.25rem;
}

.image-item-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.image-item-format {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    background: rgba(6, 182, 212, 0.1);
    color: #0891b2;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.image-item-remove {
    width: 32px;
    height: 32px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-item-remove:hover {
    background: #fee2e2;
    border-color: #ef4444;
    color: #ef4444;
}

/* ======================= OUTPUT CARD ======================= */
.output-card {
    background: #fff;
    border-radius: 1.25rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    overflow: hidden;
    margin-top: 1.5rem;
}

.output-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
}

.output-header h5 {
    margin: 0;
    font-weight: 600;
}

.output-actions .btn {
    background: rgba(255, 255, 255, 0.2);
    border-color: transparent;
    color: #fff;
}

.output-actions .btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.output-body {
    padding: 1rem;
    max-height: 400px;
    overflow-y: auto;
}

.output-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.output-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: #f0fdf4;
    border-radius: 0.75rem;
    border: 1px solid #bbf7d0;
}

.output-item-preview {
    width: 60px;
    height: 60px;
    border-radius: 0.5rem;
    overflow: hidden;
    flex-shrink: 0;
    background: #e2e8f0;
}

.output-item-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.output-item-info {
    flex: 1;
    min-width: 0;
}

.output-item-name {
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.25rem;
}

.output-item-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.output-item-format {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.output-item-download {
    padding: 0.5rem 1rem;
    background: #10b981;
    border: none;
    border-radius: 0.5rem;
    color: #fff;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.output-item-download:hover {
    background: #059669;
}

/* ======================= SETTINGS CARD ======================= */
.settings-card {
    background: #fff;
    border-radius: 1.25rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.settings-header {
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid var(--border-color);
}

.settings-header h5 {
    margin: 0;
    font-weight: 600;
    color: var(--text-primary);
}

.settings-body {
    padding: 1.5rem;
}

.setting-group {
    margin-bottom: 1.5rem;
}

.setting-label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-size: 0.9375rem;
}

.setting-hint {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

/* Format Grid */
.format-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.format-option {
    cursor: pointer;
}

.format-option input {
    display: none;
}

.format-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.375rem;
    padding: 1rem 0.5rem;
    background: #f8fafc;
    border: 2px solid var(--border-color);
    border-radius: 0.75rem;
    transition: all 0.3s ease;
    text-align: center;
}

.format-box:hover {
    border-color: #06b6d4;
}

.format-option input:checked + .format-box {
    border-color: #06b6d4;
    background: rgba(6, 182, 212, 0.1);
}

.format-icon {
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6875rem;
    font-weight: 800;
    color: #fff;
}

.png-icon { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.jpg-icon { background: linear-gradient(135deg, #f59e0b, #d97706); }
.webp-icon { background: linear-gradient(135deg, #10b981, #059669); }
.gif-icon { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.bmp-icon { background: linear-gradient(135deg, #6366f1, #4338ca); }
.ico-icon { background: linear-gradient(135deg, #ec4899, #be185d); }

.format-name {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-primary);
}

.format-desc {
    font-size: 0.6875rem;
    color: var(--text-muted);
    line-height: 1.3;
}

/* Quality Slider */
.quality-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* ICO Sizes */
.ico-sizes {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.ico-size-option {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.ico-size-option input {
    display: none;
}

.ico-size-option span {
    display: block;
    padding: 0.5rem;
    background: #f8fafc;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: center;
    width: 100%;
    transition: all 0.2s;
}

.ico-size-option:hover span {
    border-color: #06b6d4;
}

.ico-size-option input:checked + span {
    border-color: #06b6d4;
    background: rgba(6, 182, 212, 0.1);
    color: #0891b2;
}

/* Background Color */
.bg-color-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.bg-color-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: background 0.2s;
}

.bg-color-option:hover {
    background: #f8fafc;
}

.bg-color-option input[type="radio"] {
    accent-color: #06b6d4;
}

.color-box {
    width: 24px;
    height: 24px;
    border-radius: 0.375rem;
    border: 2px solid var(--border-color);
}

.color-box.white {
    background: #fff;
}

.color-box.black {
    background: #000;
}

.color-picker {
    width: 24px;
    height: 24px;
    padding: 0;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
}

/* Custom Range Slider */
.form-range {
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    outline: none;
}

.form-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #0891b2 0%, #06b6d4 100%);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(6, 182, 212, 0.3);
    transition: transform 0.2s;
}

.form-range::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.form-range::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #0891b2 0%, #06b6d4 100%);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(6, 182, 212, 0.3);
}

/* ======================= INFO CARD ======================= */
.info-card {
    background: #fff;
    border-radius: 1rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    margin-top: 1.5rem;
    overflow: hidden;
}

.info-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
    background: rgba(6, 182, 212, 0.1);
    color: #0891b2;
    font-weight: 600;
}

.info-body {
    padding: 1rem 1.25rem;
}

.info-body p {
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.info-body ul {
    margin: 0;
    padding-left: 1.25rem;
}

.info-body li {
    padding: 0.25rem 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* ======================= TIPS CARD ======================= */
.tips-card {
    background: #fff;
    border-radius: 1rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    margin-top: 1rem;
    overflow: hidden;
}

.tips-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
    font-weight: 600;
}

.tips-list {
    padding: 1rem 1.25rem;
    margin: 0;
    padding-left: 2.5rem;
}

.tips-list li {
    padding: 0.375rem 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* ======================= FEATURES SECTION ======================= */
.features-section {
    padding: 5rem 0;
    background: #fff;
}

.section-header {
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.section-desc {
    color: var(--text-secondary);
    font-size: 1.0625rem;
}

/* Conversion Matrix */
.conversion-matrix {
    max-width: 700px;
    margin: 0 auto;
    background: #f8fafc;
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.matrix-row {
    display: grid;
    grid-template-columns: 1fr repeat(6, 1fr);
    border-bottom: 1px solid var(--border-color);
}

.matrix-row:last-child {
    border-bottom: none;
}

.matrix-row.matrix-header {
    background: linear-gradient(135deg, #0891b2 0%, #06b6d4 100%);
    color: #fff;
    font-weight: 600;
}

.matrix-cell {
    padding: 0.75rem;
    text-align: center;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.matrix-cell.format-label {
    font-weight: 600;
    color: var(--text-primary);
    background: #fff;
}

.matrix-cell i {
    font-size: 1.25rem;
}

/* ======================= PROCESSING OVERLAY ======================= */
.processing-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.processing-content {
    background: #fff;
    border-radius: 1.5rem;
    padding: 3rem;
    text-align: center;
    max-width: 400px;
}

.processing-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #e2e8f0;
    border-top-color: #06b6d4;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.processing-content h4 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.processing-content p {
    color: var(--text-secondary);
    margin: 0;
}

.progress-bar-container {
    background: #e2e8f0;
    border-radius: 1rem;
    height: 8px;
    margin-top: 1.5rem;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(135deg, #0891b2 0%, #06b6d4 100%);
    border-radius: 1rem;
    transition: width 0.3s ease;
    width: 0%;
}

/* ======================= TOAST ======================= */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9999;
}

.custom-toast {
    background: #1e293b;
    color: #fff;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.3s ease;
    margin-top: 0.5rem;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.custom-toast.success { border-left: 4px solid #10b981; }
.custom-toast.error { border-left: 4px solid #ef4444; }
.custom-toast.info { border-left: 4px solid #3b82f6; }

/* ======================= RESPONSIVE ======================= */
@media (max-width: 991.98px) {
    .page-header-section {
        padding: 6rem 0 3rem;
    }

    .page-title {
        font-size: 2rem;
    }

    .format-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 767.98px) {
    .page-title {
        font-size: 1.75rem;
    }

    .quick-convert-wrapper {
        flex-direction: column;
    }

    .format-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .matrix-cell {
        padding: 0.5rem;
        font-size: 0.75rem;
    }

    .conversion-matrix {
        font-size: 0.8125rem;
    }
}

@media (max-width: 575.98px) {
    .tool-section {
        padding: 2rem 0 3rem;
    }

    .upload-area {
        padding: 2.5rem 1.5rem;
    }

    .image-item {
        flex-wrap: wrap;
    }

    .image-item-info {
        flex: 1 1 calc(100% - 80px);
    }

    .image-item-remove {
        margin-left: auto;
    }

    .ico-sizes {
        grid-template-columns: repeat(2, 1fr);
    }

    .matrix-row {
        grid-template-columns: 1.5fr repeat(6, 1fr);
    }

    .matrix-cell {
        padding: 0.375rem;
        font-size: 0.6875rem;
    }
}