
/* Tervilo Image Tools benchmark UI. Loaded only for non-compressor image tools. */
.image-tool{background:#fff;border:1px solid #dbe5f0;border-radius:20px;box-shadow:0 8px 28px rgba(15,23,42,.06);overflow:hidden;padding:24px;color:#172033}
.image-benchmark-head{display:flex;justify-content:space-between;gap:20px;align-items:flex-start;margin-bottom:22px}
.image-benchmark-eyebrow{margin:0;color:#2563eb;font-size:.72rem;font-weight:800;letter-spacing:.11em;text-transform:uppercase}
.image-benchmark-head h2{margin:5px 0 3px;font-size:1.45rem;letter-spacing:-.025em}
.image-benchmark-head>div>p:last-child{margin:0;color:#64748b;line-height:1.55}
.image-benchmark-browser{white-space:nowrap;color:#15803d;font-size:.84rem;font-weight:750}
.image-dropzone{display:grid;place-items:center;gap:6px;min-height:170px;border:2px dashed #bfdbfe;border-radius:16px;background:#f8fbff;padding:20px;text-align:center;cursor:pointer}
.image-dropzone.is-dragging,.image-dropzone:hover{border-color:#2563eb;background:#eff6ff}
.image-dropzone input{position:absolute;width:1px;height:1px;opacity:0}
.image-dropzone__icon{display:grid;place-items:center;width:48px;height:48px;border-radius:14px;background:#eaf2ff;color:#2563eb}
.image-dropzone strong{font-size:1rem}.image-dropzone span{color:#64748b;font-size:.9rem}.image-dropzone small{color:#15803d;font-weight:700;font-size:.78rem}
.image-tool__files{display:grid;gap:8px;margin-top:14px}
.image-file{display:flex;align-items:center;gap:12px;padding:11px 13px;border:1px solid #dbe5f0;border-radius:12px;background:#fff}
.image-file__name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:650}
.image-file button{width:32px;height:32px;border:1px solid #dbe5f0;border-radius:9px;background:#fff;color:#64748b;cursor:pointer}
.image-tool__options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-top:18px}
.image-field{display:flex;flex-direction:column;gap:7px;color:#172033;font-size:.88rem;font-weight:750}
.image-field input,.image-field select{box-sizing:border-box;width:100%;min-height:50px;border:1px solid #cfd9e6;border-radius:12px;padding:12px 14px;background:#fff;color:#172033;font:inherit;outline:none}
.image-field input:focus,.image-field select:focus{border-color:#2563eb;box-shadow:0 0 0 4px rgba(37,99,235,.1)}
.image-field--inline{flex-direction:row;align-items:center;justify-content:flex-start;min-height:50px}.image-field--inline input{width:auto;min-height:auto}.image-field--compact{margin-top:18px;max-width:520px}
.image-tool__hint{margin:12px 0 0;color:#64748b;font-size:.8rem;line-height:1.5}
.image-tool__actions{display:flex;gap:10px;margin-top:20px}
.image-tool__button{min-height:48px;border-radius:11px;padding:0 18px;font:inherit;font-weight:800;cursor:pointer}
.image-tool__button--primary{border:0;background:#2563eb;color:#fff;box-shadow:0 7px 18px rgba(37,99,235,.18)}
.image-tool__button--secondary{border:1px solid #cfd9e6;background:#fff;color:#172033}
.image-tool__button:disabled{opacity:.55;cursor:not-allowed}
.image-tool__status{min-height:23px;margin-top:10px;font-size:.86rem;font-weight:700}
.image-tool__status--ok{color:#15803d}.image-tool__status--error{color:#b91c1c}
.image-benchmark-result{margin-top:18px;border:1px solid #dbeafe;border-radius:18px;background:#f8fbff;overflow:hidden;scroll-margin-top:24px}
.image-benchmark-result__head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;padding:22px;border-bottom:1px solid #dbeafe;background:linear-gradient(135deg,#fbfdff,#f6faff)}
.image-benchmark-label{margin:0;color:#2563eb;font-size:.72rem;font-weight:800;letter-spacing:.11em}
.image-benchmark-result__head h3{margin:5px 0 3px;font-size:1.18rem;line-height:1.4}.image-benchmark-result__head p:last-child{margin:0;color:#64748b;font-size:.84rem}
.image-benchmark-complete{display:inline-flex;align-items:center;gap:6px;padding:9px 12px;border-radius:999px;background:#dcfce7;color:#15803d;font-size:.8rem;font-weight:800;white-space:nowrap}
.image-benchmark-items{display:grid;gap:12px;padding:16px 18px 0}
.image-benchmark-item{display:grid;grid-template-columns:180px 1fr;background:#fff;border:1px solid #e1e8f1;border-radius:14px;overflow:hidden}
.image-benchmark-preview{min-height:150px;display:grid;place-items:center;padding:14px;background:#f8fafc;border-right:1px solid #edf1f5}
.image-benchmark-preview img{max-width:100%;max-height:180px;width:auto;height:auto;object-fit:contain}
.image-benchmark-item__body{padding:16px;display:grid;gap:8px}.image-benchmark-item__body>strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.image-benchmark-item__body p{margin:0;color:#64748b;font-size:.82rem;line-height:1.5}
.image-benchmark-chips{display:flex;flex-wrap:wrap;gap:8px}.image-benchmark-chip{display:inline-flex;align-items:center;padding:6px 9px;border-radius:999px;background:#f1f5f9;color:#475569;font-size:.75rem;font-weight:750}
.image-benchmark-chip.is-good{background:#dcfce7;color:#15803d}.image-benchmark-chip.is-warn{background:#fff7ed;color:#c2410c}
.image-benchmark-download{justify-self:start;margin-top:4px;min-height:42px;border:0;border-radius:10px;padding:0 15px;background:#2563eb;color:#fff;font:inherit;font-weight:800;cursor:pointer}
.image-benchmark-download:hover{background:#1d4ed8}
.image-benchmark-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;padding:18px 18px 4px}
.image-benchmark-metric{min-width:0;padding:16px;border:1px solid #e1e8f1;border-radius:13px;background:#fff}
.image-benchmark-metric:nth-child(1){border-color:#bfdbfe;background:#eff6ff}.image-benchmark-metric:nth-child(2){border-color:#bbf7d0;background:#f0fdf4}.image-benchmark-metric:nth-child(3){border-color:#fed7aa;background:#fff7ed}.image-benchmark-metric:nth-child(4){border-color:#e9d5ff;background:#faf5ff}
.image-benchmark-metric span{display:block;color:#64748b;font-size:.76rem;font-weight:650}.image-benchmark-metric strong{display:block;margin-top:6px;font-size:1.08rem;line-height:1.3;word-break:break-word}
.image-benchmark-grid{display:grid;grid-template-columns:1.1fr .9fr;gap:14px;padding:14px 18px 0}
.image-benchmark-card{background:#fff;border:1px solid #e1e8f1;border-radius:14px;overflow:hidden}
.image-benchmark-card__head{padding:15px 16px;border-bottom:1px solid #e8edf4;display:flex;justify-content:space-between;gap:12px}
.image-benchmark-card__head h4{margin:0;font-size:.98rem}.image-benchmark-card__head span{color:#64748b;font-size:.76rem}
.image-benchmark-overview{padding:18px}.image-benchmark-big{font-size:1.85rem;font-weight:850;color:#2563eb;letter-spacing:-.02em;line-height:1.25}.image-benchmark-overview p{margin:7px 0 0;color:#64748b;font-size:.82rem;line-height:1.55}
.image-benchmark-rows{padding:8px 16px}.image-benchmark-row{display:flex;justify-content:space-between;gap:16px;padding:13px 0;border-bottom:1px solid #edf1f5;font-size:.84rem}.image-benchmark-row:last-child{border-bottom:0}.image-benchmark-row span{color:#64748b}.image-benchmark-row strong{text-align:right;word-break:break-word}
.image-benchmark-explain{margin:14px 18px 18px;background:#fff;border:1px solid #e1e8f1;border-radius:14px;overflow:hidden}
.image-benchmark-explain-grid{display:grid;grid-template-columns:repeat(3,1fr)}.image-benchmark-explain-grid>div{padding:16px;border-right:1px solid #edf1f5}.image-benchmark-explain-grid>div:last-child{border-right:0}.image-benchmark-explain-grid strong{display:block;font-size:.82rem;margin-bottom:7px}.image-benchmark-explain-grid p{margin:0;color:#64748b;font-size:.8rem;line-height:1.55}
.image-benchmark-table-wrap{overflow:auto}.image-benchmark-table{width:100%;border-collapse:collapse;background:#fff}.image-benchmark-table th,.image-benchmark-table td{padding:13px 14px;border-bottom:1px solid #edf1f5;text-align:left;font-size:.82rem;white-space:nowrap}.image-benchmark-table th{color:#64748b;font-weight:750;background:#f8fafc}.image-benchmark-table td{color:#172033}
.image-benchmark-item--single{grid-template-columns:160px 1fr}.image-benchmark-favicon-preview{width:80px;height:80px;display:grid;place-items:center;border-radius:18px;background:#eff6ff;color:#2563eb;font-size:2rem}.image-benchmark-favicon-actions{display:flex;flex-wrap:wrap;gap:8px}.image-benchmark-code{margin-top:4px;padding:12px;border-radius:10px;background:#f8fafc;color:#475569;font-size:.76rem;line-height:1.6}.image-benchmark-code code{display:block;margin-top:6px;white-space:normal}
@media(max-width:800px){.image-benchmark-metrics{grid-template-columns:repeat(2,1fr)}.image-benchmark-grid{grid-template-columns:1fr}.image-benchmark-explain-grid{grid-template-columns:1fr}.image-benchmark-explain-grid>div{border-right:0;border-bottom:1px solid #edf1f5}.image-benchmark-explain-grid>div:last-child{border-bottom:0}.image-benchmark-item{grid-template-columns:1fr}.image-benchmark-preview{border-right:0;border-bottom:1px solid #edf1f5}}
@media(max-width:620px){.image-tool{padding:18px}.image-benchmark-head{flex-direction:column}.image-benchmark-browser{white-space:normal}.image-tool__options{grid-template-columns:1fr}.image-tool__actions{flex-direction:column}.image-tool__button{width:100%}.image-benchmark-metrics{grid-template-columns:1fr}.image-benchmark-result__head{flex-direction:column}.image-benchmark-complete{white-space:normal}}

/* Visual crop editor */
.image-crop-editor{margin-top:18px;border:1px solid #dbe5f0;border-radius:16px;background:#f8fafc;overflow:hidden}
.image-crop-editor__stage{position:relative;display:flex;align-items:center;justify-content:center;min-height:300px;max-height:520px;padding:18px;overflow:hidden;background:#eef3f8}
.image-crop-editor__stage img{display:block;max-width:100%;max-height:480px;width:auto;height:auto;object-fit:contain;user-select:none;pointer-events:none}
.image-crop-editor__shade{position:absolute;inset:0;pointer-events:none}
.image-crop-editor__selection{position:absolute;border:2px solid #2563eb;background:rgba(37,99,235,.10);box-shadow:0 0 0 9999px rgba(15,23,42,.42);cursor:move;touch-action:none;min-width:24px;min-height:24px}
.image-crop-editor__handle{position:absolute;width:12px;height:12px;background:#fff;border:2px solid #2563eb;border-radius:3px;z-index:2;box-sizing:border-box;touch-action:none}
.image-crop-editor__handle--nw{left:-7px;top:-7px;cursor:nwse-resize}.image-crop-editor__handle--ne{right:-7px;top:-7px;cursor:nesw-resize}.image-crop-editor__handle--sw{left:-7px;bottom:-7px;cursor:nesw-resize}.image-crop-editor__handle--se{right:-7px;bottom:-7px;cursor:nwse-resize}
.image-crop-editor__size{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);padding:5px 8px;border-radius:7px;background:rgba(15,23,42,.78);color:#fff;font-size:.72rem;font-weight:800;white-space:nowrap;pointer-events:none}
.image-crop-editor__toolbar{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:13px 16px;border-top:1px solid #dbe5f0;background:#fff}
.image-crop-editor__toolbar strong,.image-crop-editor__toolbar span{display:block}.image-crop-editor__toolbar strong{font-size:.82rem}.image-crop-editor__toolbar div span{margin-top:3px;color:#64748b;font-size:.75rem}.image-crop-editor__dimensions{color:#2563eb!important;font-weight:800;font-size:.8rem!important}
.image-crop-editor__inputs{margin-top:14px}

/* Rotate & flip control panel */
.image-rotate-panel{margin-top:18px;padding:18px;border:1px solid #dbe5f0;border-radius:16px;background:#f8fafc}
.image-rotate-control{max-width:520px}.image-rotate-flips{display:flex;gap:12px;margin-top:16px;flex-wrap:wrap}
.image-toggle{position:relative;display:flex;align-items:center;gap:10px;min-height:50px;padding:0 15px;border:1px solid #cfd9e6;border-radius:12px;background:#fff;color:#172033;font-size:.88rem;font-weight:750;cursor:pointer;transition:.15s ease}
.image-toggle input{position:absolute;opacity:0;pointer-events:none}
.image-toggle__box{width:19px;height:19px;border:2px solid #94a3b8;border-radius:5px;background:#fff;display:grid;place-items:center;flex:0 0 auto}
.image-toggle input:checked + .image-toggle__box{border-color:#2563eb;background:#2563eb}
.image-toggle input:checked + .image-toggle__box:after{content:'✓';color:#fff;font-size:12px;font-weight:900;line-height:1}
.image-toggle:has(input:checked){border-color:#93c5fd;background:#eff6ff}
@media(max-width:620px){
 .image-crop-editor__stage{min-height:240px;padding:10px}.image-crop-editor__toolbar{align-items:flex-start;flex-direction:column}
 .image-rotate-flips{flex-direction:column}.image-toggle{width:100%;box-sizing:border-box}
}
