/* ================================================================
   CleanPDF — Shared Image Converter Styles
   Version: 1.0.0
   Used by: /heic-to-jpg, /png-to-jpg, /webp-to-jpg, etc.
   ================================================================ */

/* ---------- Converter Container ---------- */
.img-conv-wrap {
    max-width: 1100px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.img-conv-wrap .page-title {
    font-size: 2.1rem;
    line-height: 1.25;
    color: #1a202c;
    margin-bottom: 0.75rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.img-conv-wrap .page-subtitle {
    font-size: 1.08rem;
    color: #4a5568;
    max-width: 780px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ---------- Trust Box ---------- */
.img-conv-trust {
    max-width: 820px;
    margin: 1.5rem auto 2rem;
    padding: 1.1rem 1.25rem;
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 12px;
    text-align: center;
}
.img-conv-trust ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem 1.5rem;
    font-weight: 600;
    color: #166534;
    font-size: 0.95rem;
}

/* ---------- Drop Zone ---------- */
.img-conv-drop {
    position: relative;
    border: 3px dashed #cbd5e0;
    border-radius: 16px;
    text-align: center;
    background: #fafbfc;
    margin: 20px 0;
    transition: all 0.25s ease;
    cursor: pointer;
    outline: none;
}
.img-conv-drop:hover,
.img-conv-drop:focus {
    border-color: #4f46e5;
    background: #eef2ff;
}
.img-conv-drop.dragover {
    border-color: #4f46e5;
    border-style: solid;
    background: #eef2ff;
    transform: scale(1.01);
    box-shadow: 0 10px 30px rgba(79, 70, 229, 0.15);
}
.img-conv-drop input[type="file"] {
    display: none !important;
}
.img-conv-label {
    display: block;
    width: 100%;
    padding: 50px 20px;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
}
.img-conv-icon {
    font-size: 46px;
    margin-bottom: 12px;
    display: block;
}
.img-conv-icon strong {
    font-size: 1.1rem;
    color: #2d3748;
}
.img-conv-drop p {
    margin: 0.35rem 0;
    color: #4a5568;
}
.img-conv-drop p strong {
    color: #1a202c;
}

/* ---------- Preview / File List ---------- */
.img-conv-preview {
    display: none;
    padding: 1.5rem;
    text-align: left;
    border-top: 1px solid #e2e8f0;
}
.img-conv-preview.active {
    display: block;
}
.img-conv-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.img-conv-preview-header .summary {
    font-weight: 600;
    color: #2d3748;
}
.img-conv-change-btn {
    color: #4299e1;
    font-size: 0.85rem;
    border: 1px solid #4299e1;
    padding: 6px 16px;
    border-radius: 20px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    user-select: none;
}
.img-conv-change-btn:hover {
    background: #4299e1;
    color: #fff;
}

/* ---------- File List ---------- */
.img-conv-list {
    display: grid;
    grid-template-columns: 2.2fr 0.9fr 1fr 0.9fr 0.9fr;
    gap: 0.5rem;
    padding: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.88rem;
    align-items: center;
}
.img-conv-list.header {
    background: #edf2f7;
    font-weight: 600;
    font-size: 0.82rem;
    color: #2d3748;
    border-radius: 8px 8px 0 0;
}
.img-conv-list:last-child {
    border-bottom: none;
}
.img-conv-list .fname {
    word-break: break-all;
    font-weight: 500;
    color: #1a202c;
}
.img-conv-thumb {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
    background: #e2e8f0;
    display: inline-block;
    vertical-align: middle;
    margin-right: 0.5rem;
}
.img-conv-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
}
.img-conv-badge.pending { background: #e2e8f0; color: #4a5568; }
.img-conv-badge.working { background: #fef3c7; color: #92400e; }
.img-conv-badge.done    { background: #d1fae5; color: #065f46; }
.img-conv-badge.error   { background: #fee2e2; color: #991b1b; }

.img-conv-dl-btn {
    padding: 5px 10px;
    font-size: 0.78rem;
    border-radius: 6px;
    background: #059669;
    color: #fff;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-weight: 600;
    transition: background 0.15s;
}
.img-conv-dl-btn:hover { background: #047857; }
.img-conv-dl-btn.disabled {
    background: #cbd5e0;
    color: #718096;
    cursor: not-allowed;
    pointer-events: none;
}

/* ---------- Controls (Quality / Options) ---------- */
.img-conv-controls {
    background: #f9fafb;
    border-radius: 12px;
    padding: 1.25rem;
    margin: 1.25rem 0;
}
.img-conv-control-row {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}
.img-conv-control-row + .img-conv-control-row {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}
.img-conv-control-row label {
    font-weight: 600;
    color: #2d3748;
    min-width: 130px;
}
.img-conv-control-row input[type="range"] {
    flex: 1;
    min-width: 140px;
    accent-color: #4f46e5;
}
.img-conv-control-row .value-display {
    min-width: 60px;
    text-align: center;
    font-weight: 700;
    color: #4f46e5;
    font-size: 0.95rem;
}

/* ---------- Action Buttons ---------- */
.img-conv-actions {
    text-align: center;
    margin-top: 1.25rem;
}
.img-conv-primary-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #4f46e5;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 1rem 2rem;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    min-width: 260px;
    justify-content: center;
}
.img-conv-primary-btn:hover:not(:disabled) {
    background: #4338ca;
    transform: translateY(-1px);
}
.img-conv-primary-btn:disabled {
    background: #a5b4fc;
    cursor: not-allowed;
}

/* ---------- Progress ---------- */
.img-conv-progress {
    display: none;
    max-width: 520px;
    margin: 1.5rem auto;
}
.img-conv-progress.active { display: block; }
.img-conv-progress-outer {
    width: 100%;
    height: 22px;
    background: #e2e8f0;
    border-radius: 11px;
    overflow: hidden;
}
.img-conv-progress-inner {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #4f46e5, #7c3aed);
    transition: width 0.3s ease;
}
.img-conv-progress-label {
    text-align: center;
    margin-top: 8px;
    font-size: 0.9rem;
    color: #4a5568;
    font-weight: 600;
}

/* ---------- Status Message ---------- */
.img-conv-status {
    margin-top: 1.25rem;
    font-weight: 600;
    color: #4a5568;
    text-align: center;
    min-height: 1.5rem;
}

/* ---------- Download-All Section ---------- */
.img-conv-download-all {
    display: none;
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f0fdf4;
    border: 2px solid #86efac;
    border-radius: 12px;
    text-align: center;
}
.img-conv-download-all.active { display: block; }
.img-conv-download-all h2 {
    color: #2f855a;
    margin-bottom: 1rem;
    font-size: 1.4rem;
}
.img-conv-download-all .btn-zip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #059669;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 0.9rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.img-conv-download-all .btn-zip:hover {
    background: #047857;
}
.img-conv-download-all .btn-zip:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ---------- SEO Content ---------- */
.img-conv-seo {
    max-width: 900px;
    margin: 3rem auto 0;
    line-height: 1.7;
    color: #4a5568;
}
.img-conv-seo h2 {
    color: #1a202c;
    margin-top: 2.5rem;
    font-size: 1.55rem;
    letter-spacing: -0.01em;
}
.img-conv-seo h3 {
    color: #2d3748;
    margin-top: 1.75rem;
    font-size: 1.15rem;
}
.img-conv-seo ul, .img-conv-seo ol {
    margin-left: 1.25rem;
    margin-bottom: 1rem;
}
.img-conv-seo li {
    margin-bottom: 0.4rem;
}
.img-conv-seo code {
    background: #edf2f7;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.88em;
}
.img-conv-callout {
    background: #ebf8ff;
    border-left: 4px solid #3182ce;
    padding: 1.25rem 1.5rem;
    border-radius: 0 8px 8px 0;
    margin: 1.75rem 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .img-conv-list.header { display: none; }
    .img-conv-list {
        grid-template-columns: 1fr;
        gap: 0.4rem;
        padding: 1rem;
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        margin-bottom: 0.5rem;
    }
    .img-conv-list > span::before {
        content: attr(data-label) ": ";
        font-weight: 600;
        color: #4a5568;
        margin-right: 0.35rem;
    }
    .img-conv-wrap .page-title { font-size: 1.65rem; }
    .img-conv-label { padding: 30px 15px; }
    .img-conv-control-row { flex-direction: column; align-items: stretch; }
    .img-conv-control-row label { min-width: auto; }
    .img-conv-primary-btn { width: 100%; }
}