[hidden] { display: none !important; }

/* ——— Layout ————————————————————————————————————————————————————————————— */

.ic-wrap {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ——— Controls ———————————————————————————————————————————————————————————— */

.ic-controls {
    display: flex;
    align-items: center;
    padding: 0 clamp(1.5rem, 5vw, 3rem);
    height: 56px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    gap: 1.5rem;
}

.ic-controls__left  { flex-shrink: 0; }
.ic-controls__center {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex: 1;
    justify-content: center;
}
.ic-controls__right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.ic-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.4rem;
    letter-spacing: 0.05em;
    color: var(--text);
}

/* Options */
.ic-opt {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    color: var(--muted);
    white-space: nowrap;
    cursor: default;
}

.ic-select {
    height: 28px;
    padding: 0 0.5rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    font-size: 0.78rem;
    font-family: inherit;
    cursor: pointer;
}

.ic-range {
    width: 100px;
    accent-color: var(--accent);
    cursor: pointer;
}

.ic-range-val {
    font-size: 0.72rem;
    color: var(--text);
    min-width: 3ch;
    text-align: right;
}

.ic-btn {
    height: 34px;
    padding: 0 1.1rem;
    border-radius: 7px;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    font-family: inherit;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
    white-space: nowrap;
}

.ic-btn--ghost {
    background: transparent;
    color: var(--text);
    border-color: var(--border);
}
.ic-btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.ic-btn:disabled { opacity: 0.35; pointer-events: none; }

/* ——— Stats ——————————————————————————————————————————————————————————————— */

.ic-stats {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.55rem clamp(1.5rem, 5vw, 3rem);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    font-size: 0.8rem;
}

.ic-stats__item { color: var(--muted); }
.ic-stats__item strong { color: var(--text); }
.ic-stats__sep { color: var(--muted); opacity: 0.3; }

/* ——— Main split ————————————————————————————————————————————————————————— */

.ic-main {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.ic-divider {
    width: 1px;
    background: var(--border);
    flex-shrink: 0;
}

.ic-panel {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ic-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    height: 40px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.ic-panel__label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
}

.ic-panel__format {
    font-size: 0.7rem;
    color: var(--accent);
    font-weight: 600;
    letter-spacing: 0.05em;
}

.ic-panel__body {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

/* ——— Drop zone ——————————————————————————————————————————————————————————— */

.ic-dropzone {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    cursor: pointer;
    padding: 2rem;
    transition: background 0.15s;
    border: 2px dashed transparent;
    margin: 1rem;
    border-radius: 10px;
}

.ic-dropzone:hover,
.ic-dropzone.is-drag-over {
    background: rgba(59, 130, 246, 0.05);
    border-color: rgba(59, 130, 246, 0.25);
}

.ic-dropzone__text {
    text-align: center;
    font-size: 0.85rem;
    color: var(--muted);
    line-height: 1.8;
    margin: 0;
}

.ic-dropzone__text span {
    font-size: 0.75rem;
    opacity: 0.55;
    text-decoration: underline;
    text-decoration-style: dotted;
    cursor: pointer;
}

/* ——— Image preview ——————————————————————————————————————————————————————— */

.ic-img-wrap {
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    overflow: auto;
    background: repeating-conic-gradient(
        rgba(255, 255, 255, 0.03) 0% 25%,
        transparent 0% 50%
    ) 0 0 / 24px 24px;
}

.ic-img-wrap img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

/* ——— Empty state ————————————————————————————————————————————————————————— */

.ic-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
    text-align: center;
    color: var(--muted);
    opacity: 0.35;
    pointer-events: none;
}

.ic-empty p {
    font-size: 0.82rem;
    line-height: 1.75;
    margin: 0;
}

/* ——— Processing indicator ——————————————————————————————————————————————— */

.ic-processing {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(2px);
    z-index: 5;
    pointer-events: none;
}

.ic-spinner {
    width: 28px;
    height: 28px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: ic-spin 0.7s linear infinite;
}

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

/* ——— Responsive ————————————————————————————————————————————————————————— */

@media (max-width: 860px) {
    .ic-main { flex-direction: column; }
    .ic-divider { width: 100%; height: 1px; }
    .ic-panel { min-height: 280px; }
}

@media (max-width: 680px) {
    .ic-controls__center { display: none; }
    .ic-controls__left { flex: 1; }
}
