/* ===== PhotoWizard – vlastní styly ===== */

/* Custom scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #0f172a; }
::-webkit-scrollbar-thumb { background: #334155; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #475569; }

/* ===== Posuvníky (range) ===== */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 9999px;
    background: #1e293b;
    outline: none;
    cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 9999px;
    background: #6366f1;
    border: 2px solid #c7d2fe;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    transition: transform 0.1s ease;
}
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.15); }
input[type="range"]::-moz-range-track {
    height: 6px;
    border-radius: 9999px;
    background: #1e293b;
}
input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 9999px;
    background: #6366f1;
    border: 2px solid #c7d2fe;
    cursor: pointer;
}

/* ===== Posuvník + číselné pole ===== */
.slider-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}
.slider-controls input[type="range"] { flex: 1; }
.number-wrap {
    position: relative;
    flex-shrink: 0;
}
.number-wrap input[type="number"] {
    width: 72px;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 6px 22px 6px 10px;
    font-size: 12px;
    color: #e2e8f0;
    text-align: right;
    -moz-appearance: textfield;
    appearance: textfield;
}
.number-wrap input[type="number"]::-webkit-outer-spin-button,
.number-wrap input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.number-wrap input[type="number"]:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 1px #6366f1;
}
.number-wrap .unit {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    color: #64748b;
    pointer-events: none;
}

/* ===== Barevné štítky hodnot ===== */
.value-badge {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    background: #0f172a;
    color: #818cf8;
    border: 1px solid #334155;
    border-radius: 6px;
}
.value-badge-emerald { color: #34d399; }

/* ===== Modální okna ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    background: rgba(2, 6, 23, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.modal-overlay.hidden { display: none; }

.modal-card {
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 16px;
    width: 100%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.7);
    overflow: hidden;
    animation: modal-in 0.15s ease;
}
.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid #1e293b;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #020617;
}

@keyframes modal-in {
    from { opacity: 0; transform: translateY(8px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ===== Ořez (crop) ===== */
.crop-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: #020617;
    min-height: 300px;
    max-height: 52vh;
    overflow: hidden;
}
.crop-viewport {
    position: relative;
    display: inline-block;
    max-width: 100%;
    max-height: 100%;
    user-select: none;
    touch-action: none;
}
.crop-viewport img {
    display: block;
    width: 100%;
    height: 100%;
    pointer-events: none;
}
.crop-box {
    position: absolute;
    border: 2px solid #818cf8;
    box-shadow: 0 0 0 9999px rgba(2, 6, 23, 0.55);
    cursor: move;
    box-sizing: border-box;
}
.crop-box::before,
.crop-box::after {
    content: "";
    position: absolute;
    background: rgba(129, 140, 248, 0.4);
    pointer-events: none;
}
.crop-box::before {
    left: 33.333%;
    right: 33.333%;
    top: 0;
    height: 100%;
    width: 33.333%;
    border-left: 1px solid rgba(255, 255, 255, 0.35);
    border-right: 1px solid rgba(255, 255, 255, 0.35);
}
.crop-box::after {
    top: 33.333%;
    bottom: 33.333%;
    left: 0;
    width: 100%;
    height: 33.333%;
    border-top: 1px solid rgba(255, 255, 255, 0.35);
    border-bottom: 1px solid rgba(255, 255, 255, 0.35);
}
.crop-handle {
    position: absolute;
    width: 16px;
    height: 16px;
    background: #fff;
    border: 2px solid #6366f1;
    border-radius: 9999px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
    z-index: 2;
}
.crop-handle.nw { top: -9px; left: -9px; cursor: nwse-resize; }
.crop-handle.ne { top: -9px; right: -9px; cursor: nesw-resize; }
.crop-handle.sw { bottom: -9px; left: -9px; cursor: nesw-resize; }
.crop-handle.se { bottom: -9px; right: -9px; cursor: nwse-resize; }

/* ===== Přepínače poměru stran ===== */
.ratio-list { display: flex; flex-wrap: wrap; gap: 4px; }
.ratio-btn {
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 500;
    background: #1e293b;
    color: #94a3b8;
    border: 1px solid #334155;
    cursor: pointer;
    transition: all 0.12s ease;
}
.ratio-btn:hover { color: #e2e8f0; background: #334155; }
.ratio-btn.active {
    background: #6366f1;
    color: #fff;
    border-color: #6366f1;
}

/* ===== Přepínač režimu rozměrů ===== */
#resizeModeMaxBtn,
#resizeModeExactBtn { color: #94a3b8; }
#resizeModeMaxBtn.active,
#resizeModeExactBtn.active {
    background: #6366f1;
    color: #fff;
}
