.wpdsv-wrapper {
    width: 100%;
    max-width: 1000px;
    margin: 20px auto;
    background: #111;
    color: #fff;
    border-radius: 10px;
    overflow: hidden;
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column;
    position: relative;
}

.wpdsv-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    background: #1e1e1e;
    flex-wrap: wrap;
    flex: 0 0 auto;
}

.wpdsv-toolbar button,
.wpdsv-toolbar select {
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid #444;
    border-radius: 6px;
    background: #2d2d2d;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.2;
}

.wpdsv-toolbar button:hover,
.wpdsv-toolbar select:hover {
    background: #3a3a3a;
}

.wpdsv-counter {
    margin-left: auto;
    padding: 0 10px;
    font-weight: 700;
    color: #fff;
    font-size: 15px;
    white-space: nowrap;
}

.wpdsv-window-preset {
    min-width: 115px;
}

.wpdsv-canvas-container {
    flex: 1 1 auto;
    min-height: 0;
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    touch-action: none;
    position: relative;
}

.wpdsv-canvas {
    display: block;
    max-width: 100%;
    max-height: 100%;
    background: #000;
    cursor: grab;
    transform-origin: center center;
    transition: transform 0.05s linear;
    touch-action: none;
}

.wpdsv-canvas:active {
    cursor: grabbing;
}

.wpdsv-footer,
.wpdsv-roi-result {
    padding: 8px 10px;
    font-size: 13px;
    color: #ccc;
    background: #181818;
    border-top: 1px solid #333;
    flex: 0 0 auto;
}

.wpdsv-roi-tool-active {
    background: #007cba !important;
    color: #fff !important;
    border-color: #009fe3 !important;
}

/* Overlay: no modifica el tamaño del canvas */
.wpdsv-loading {
    position: fixed;
      right: 20px;
    bottom: 20px;
    width: 260px;
    z-index: 99999;

    background: rgba(24,24,24,.92);
    border: 1px solid #333;
    border-radius: 8px;
    padding: 8px 10px;

    color: #ccc;
    font-size: 13px;

    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease;
}

.wpdsv-loading-bar {
    height: 6px;
    width: 0%;
    background: #007cba;
    border-radius: 4px;
    transition: width 0.2s ease;
    margin-bottom: 5px;
}

.wpdsv-loading-text {
    display: block;
}
/* V20: selector de series */
.wpdsv-series-select {
    background: #2b2b2b;
    color: #fff;
    border: 1px solid #555;
    border-radius: 6px;
    padding: 8px 10px;
    min-height: 38px;
}

/* V24: ficha resumen del estudio */
.wpdsv-study-card {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    max-width: 920px;
    margin: 12px 0 10px 0;
    padding: 12px 14px;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    background: #f6f8fa;
    font-size: 14px;
}
.wpdsv-study-card div {
    white-space: nowrap;
}

/* V25: herramienta de medición */
.wpdsv-measure-tool-active {
    background: #00a3b5 !important;
    color: #fff !important;
    border-color: #00e5ff !important;
}

@media (max-width: 700px) {
    .wpdsv-wrapper {
        border-radius: 6px;
    }
    .wpdsv-toolbar {
        gap: 6px;
        padding: 8px;
    }
    .wpdsv-toolbar button,
    .wpdsv-toolbar select {
        min-height: 42px;
        font-size: 13px;
        padding: 0 10px;
    }
    .wpdsv-counter {
        width: 100%;
        margin-left: 0;
        padding: 4px 2px;
        font-size: 13px;
    }
    .wpdsv-footer {
        font-size: 12px;
    }
}


/* V26: experiencia de uso */
.wpdsv-wrapper:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

.wpdsv-slice-scrubber-wrap {
    background: #151515;
    border-top: 1px solid #333;
    padding: 8px 10px;
}

.wpdsv-slice-scrubber {
    width: 100%;
    display: block;
    accent-color: #007cba;
}

.wpdsv-cine-active {
    background: #b35c00 !important;
    border-color: #ff9d2e !important;
    color: #fff !important;
}

.wpdsv-fullscreen-mode {
    width: 100vw !important;
    height: 100vh !important;
    max-width: none !important;
    margin: 0 !important;
    border-radius: 0 !important;
    z-index: 999999;
}

.wpdsv-fullscreen-mode .wpdsv-canvas-container {
    min-height: 0;
}

@media (max-width: 700px) {
    .wpdsv-slice-scrubber-wrap {
        padding: 10px;
    }
    .wpdsv-slice-scrubber {
        height: 28px;
    }
}
