/* =========================
   CONTENEDOR GENERAL VISOR
   ========================= */

#docriluc-visor-3d-wrap {
    position: relative;
    width: 100%;
    margin-top: 10px;
}

/* WRAPPER VISOR */
#docriluc-visor-3d-wrap .viewer-wrapper {
    position: relative;
    height: 500px;
    border-radius: 16px;
    overflow: hidden;
}

/* MODEL VIEWER */
#docriluc-visor-3d-wrap model-viewer {
    width: 100%;
    height: 100%;
    display: block;
}

/* BOTÓN CERRAR */
#cerrar-visor-3d {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 200;
    background: #6f1132;
    color: #fff;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

/* =========================
   LOADER
   ========================= */

#loading-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(209, 210, 211, 0.25);
    backdrop-filter: blur(2px);
    border-radius: 16px;
    z-index: 50;
    pointer-events: none;
}

.loading-dots {
    display: flex;
    gap: 8px;
}

.loading-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #6f1132;
    animation: docrilucDots 1.4s infinite ease-in-out both;
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }
.loading-dots span:nth-child(3) { animation-delay: 0s; }

@keyframes docrilucDots {
    0%, 80%, 100% {
        transform: scale(0.55);
        opacity: 0.3;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* =========================
   TOOLBAR
   ========================= */

#docriluc-visor-toolbar {
    width: 100%;
    margin-top: 14px;
    overflow: visible; /* quitamos scroll visible */
}

#docriluc-visor-toolbar .docriluc-visor-toolbar-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 5px;
    align-items: center;
    white-space: nowrap;
}

/* CHIP BASE */
.docriluc-chip {
    box-sizing: border-box;
    flex: 0 0 auto;
    height: 46px;
    min-height: 46px;
    border-radius: 999px;
    background: #ffffff;
    color: #1f2937;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* =========================
   CHIP SELECT
   ========================= */

.docriluc-chip-select {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 16px;
    border: 1px solid #6f1132;
}

.docriluc-chip-select label {
    margin: 0;
    display: inline-flex;
    align-items: center;
    height: 100%;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    color: #1f2937;
}

#docriluc-visor-3d-wrap .viewer-wrapper {
    position: relative;
}

#dimLines.dimensionLineContainer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: visible;
    z-index: 15;
}

#dimLines .dimensionLine {
    stroke: #22c1ee;
    stroke-width: 2.5;
    fill: none;
}
.docriluc-chip-select select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;

    margin: 0;
    padding: 0 20px 0 0;
    height: 100%;
    min-height: 0;

    display: inline-flex;
    align-items: center;

    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    color: #1f2937;
    cursor: pointer;

    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%236f1132' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right center;
    background-size: 13px 8px;
}

.docriluc-chip-select select:focus,
.docriluc-chip-select select:focus-visible,
.docriluc-chip-select select:hover {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background-color: transparent !important;
}

.docriluc-chip-select select option {
    background: #ffffff;
    color: #1f2937;
}

/* =========================
   CHIP CHECKBOX
   ========================= */

.docriluc-chip-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    padding: 0 16px;
    border: none;
    cursor: pointer;
    user-select: none;
}

.docriluc-chip-check input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.docriluc-check-indicator {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    border: 2px solid #33b1e6;
    background: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 20px;
    margin: 0;
}

.docriluc-chip-check input:checked + .docriluc-check-indicator {
    background: #1ea7e1;
    border-color: #1ea7e1;
}

.docriluc-chip-check input:checked + .docriluc-check-indicator::after {
    content: "✓";
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
}

.docriluc-check-text {
    display: inline-flex;
    align-items: center;
    height: 100%;
    margin: 0;

    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
    color: #1f2937;
}

/* =========================
   RESPONSIVE
   ========================= */

@media (max-width: 767px) {
    #docriluc-visor-toolbar {
        overflow-x: auto;
        overflow-y: hidden;
    }
}