/* ========================================================================
   GENERAL STYLES
   ======================================================================== */

.model-3d-container {
    width: 100%;
    position: relative;
    margin-bottom: 30px;
}

.model-3d-container canvas {
    width: 100%;
    height: 100%;
}

/* Compatibilidad con shortcodes antiguos - clase .full */
.full {
    width: 100%;
    position: relative;
    margin-bottom: 30px;
}

.full canvas {
    width: 100% !important;
    height: 100% !important;
}

.noselect {
    user-select: none;
}

/* ========================================================================
   TOOLBAR STYLES
   ======================================================================== */

.model-3d-container .toolbar {
    z-index: 35;
    position: absolute;
    height: auto;
    top: 10px;
    left: 10px;
    margin: 0;
    padding: 7px 4px 0;
    border-radius: 5px;
    opacity: 0.25;
    background-color: #fff;
}

.model-3d-container .toolbar:hover {
    opacity: 0.95;
}

.toolbar div.tb-button-sep {
    margin-left: 2px;
    display: inline;
}

.model-3d-container .toolbar input[type="image"] {
    padding: 8px;
}

/* ========================================================================
   SCENE STYLES (Multi-scene layout)
   ======================================================================== */

#scene1 {
    position: absolute;
    top: 0;
    left: 0;
    width: 49.75%;
    height: auto;
}

#scene2 {
    position: absolute;
    top: 0;
    right: 0;
    width: 49.75%;
    height: auto;
}

#scene3 {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 49.75%;
    height: auto;
}

#scene4 {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 49.75%;
    height: auto;
}

/* ========================================================================
   UNLOCK/LOCK OVERLAY STYLES
   ======================================================================== */

.unlock {
    cursor: pointer;
    width: 100%;
    height: 100%;
    background-color: rgb(255 255 255 / 10%);
    position: absolute;
    left: 0;
    top: 0;
    z-index: 15;
}

.click-to-unlock {
    font-size: 7vh;
    position: absolute;
    top: 45%;
    left: 50%;
    color: #eee;
    transform: translate(-50%, -50%);
    display: block;
    white-space: nowrap;
    opacity: 0.75;
    font-weight: 500;
}

.click-to-unlock.horiz {
    font-size: 10vw;
}

.click-to-unlock.vert {
    font-size: 7vh;
}

.unlock:hover .click-to-unlock {
    opacity: 1;
}

/* ========================================================================
   TABS STYLES
   ======================================================================== */

.model-3d-tabs .model-3d-tabs-nav {
    display: table;
    position: relative;
    list-style: none outside none;
    margin: 0;
    padding: 0;
    overflow: hidden;
    vertical-align: middle;
    width: 100%;
    box-sizing: border-box;
}

.model-3d-tabs .model-3d-tabs-nav li {
    position: relative;
    display: table-cell;
    vertical-align: middle;
    margin: 0;
    background: transparent;
    border-bottom: 0;
}

.model-3d-tabs .model-3d-tabs-nav li a {
    position: relative;
    display: table;
    width: 100%;
    padding: 6px 5px 6px 10px;
    color: darkgray;
    text-decoration: none;
    box-sizing: border-box;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
}

.model-3d-tabs .model-3d-tabs-nav li a::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    background-color: rgb(255 255 255 / 5%);
    transition: opacity 0.2s;
}

.model-3d-tabs .model-3d-tabs-nav li a span {
    position: relative;
    z-index: 1;
    transition: initial;
}

/* Active tab states */
.model-3d-tabs .model-3d-tabs-nav li.ui-state-active {
    background: #f2f2f2;
    color: #303030;
    border-bottom: 0;
}

.model-3d-tabs .model-3d-tabs-nav li.ui-state-active a {
    color: #303030;
}

.model-3d-tabs .model-3d-tabs-container {
    position: relative;
    padding: 0;
    background-color: #fff;
    box-sizing: border-box;
}

.model-3d-tabs .model-3d-tabs-container canvas {
    border: 0;
}

.model-3d-container[data-stl-shortcode] {
    margin-top: 0;
}

/* ========================================================================
   ERROR STYLES
   ======================================================================== */

#no-webgl {
    font-size: 4vh;
    display: table-cell;
    background: lightgray;
    vertical-align: middle;
    line-height: normal;
}

/* ========================================================================
   RESPONSIVE STYLES
   ======================================================================== */

/* Reduce font size when there are more than 3 tabs to prevent crowding */
.model-3d-tabs .model-3d-tabs-nav.tabs-compact li {
    font-size: 12px;
}

@media only screen and (max-width: 768px) {
    .model-3d-tabs .model-3d-tabs-nav li {
        display: block;
    }

    .model-3d-container .toolbar,
    .click-to-unlock {
        zoom: 0.75;
    }

    #is-mobile-device {
        display: none;
    }

    .model-3d-tabs .model-3d-tabs-nav li.ui-state-active:not(:last-child) {
        border-bottom: 1px solid darkgray;
    }
}
