.cad-widget {
    max-width: 720px;
    width: 100%;
    margin: 1em auto;
    font-family: inherit;
    box-sizing: border-box;
}

.cad-boton-abrir,
.cad-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 30px;
    border-radius: 999px;
    border: none;
    background: #5494de;
    color: #fff;
    cursor: pointer;
    font-size: 16px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 4px 6px 4px 0;
    transition: background-color 0.15s ease, transform 0.05s ease;
}

.cad-icono-boton {
    width: 26px;
    height: 26px;
    object-fit: contain;
    flex-shrink: 0;
}

.cad-boton-abrir:hover,
.cad-btn:hover {
    background: #0654b0;
}

.cad-boton-abrir:active,
.cad-btn:active {
    transform: scale(0.97);
}

.cad-btn-primario {
    background: #0654b0;
    color: #fff;
}

.cad-btn-primario:hover {
    background: #054394;
}

.cad-btn-secundario {
    background: transparent;
    color: #0654b0;
    border: 2px solid #0654b0;
    padding: 12px 28px;
}

.cad-btn-secundario:hover {
    background: #eaf1fb;
}

.cad-camara-caja {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 16px;
    margin-top: 10px;
    text-align: center;
    background: #fafafa;
    box-sizing: border-box;
}

.cad-camara-caja img {
    width: 100%;
    max-width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 8px;
    background: #000;
}

/* En pantallas más anchas (tablet/escritorio) evitamos que la vista previa
   quede excesivamente alta manteniendo el ancho grande */
@media (min-width: 700px) {
    .cad-camara-caja img {
        aspect-ratio: 4 / 3;
    }
}

/* En móviles muy pequeños, que el widget aproveche todo el ancho disponible */
@media (max-width: 480px) {
    .cad-widget {
        max-width: 100%;
    }
    .cad-camara-caja {
        padding: 10px;
    }
}

.cad-botones {
    margin-top: 12px;
}

.cad-estado {
    margin-top: 10px;
    font-size: 14px;
    min-height: 1.2em;
}

.cad-estado-error {
    color: #c0392b;
}
