/*
Theme Name: Territorio Elemental 5.9
Theme URI: https://territorioelemental.cl/
Author: Equipo Territorio Elemental
Description: Tema independiente de Territorio Elemental con mapa 3D y primera fila adaptable. Andrea integrada, fecha y clima, papel compartido.
Version: 5.9.30
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: territorio-elemental-v4
*/

.pe-fallback{max-width:1050px;margin:70px auto;padding:30px;font:16px/1.6 Georgia,serif;color:#252c25;background:#f5f0e5}.pe-fallback h1{font-size:30px}.pe-fallback img{max-width:100%;height:auto}

/* TE 5.8 — Panel privado integrado, conservando la portada */
body.te-pe-access-active #tePeAccessLayer{padding-top:78px!important;background:rgba(20,15,11,.44)!important;pointer-events:auto!important}
body.te-pe-access-active #tePeAccessLayer .te-pe-access-paper{width:min(1240px,96vw)!important;height:calc(100vh - 78px)!important;overflow:hidden!important;display:flex!important;flex-direction:column!important}
body.te-pe-access-active #tePeAccessFrame{display:block!important;flex:1!important;min-height:0!important;padding:0!important;overflow:hidden!important}
body.te-pe-access-active #tePeAccessFrame[hidden]{display:none!important}
.te58-admin-iframe{width:100%;height:100%;border:0;display:block;background:#f5f0e6}
@media(max-width:720px){body.te-pe-access-active #tePeAccessLayer{padding-top:64px!important}body.te-pe-access-active #tePeAccessLayer .te-pe-access-paper{height:calc(100vh - 64px)!important;width:100vw!important}}

/* TE 5.8.1: vista de administración a página completa, papel continuo. */
body.te-pe-access-active #tePeAccessLayer{inset:0!important;padding:0!important;background:transparent!important;pointer-events:none!important;z-index:21000!important}
body.te-pe-access-active #tePeAccessLayer .te-pe-access-paper{width:min(1050px,82vw)!important;height:100vh!important;max-height:100vh!important;margin:0 auto!important;overflow:hidden!important;border-radius:0!important;box-shadow:0 0 24px #0004!important;background:#f5f0e6 url('assets/papel-artesanal.jpg') repeat!important;background-size:512px 512px!important;pointer-events:auto!important}
body.te-pe-access-active .te-pe-access-toolbar{position:relative!important;z-index:2!important;flex:0 0 auto!important;margin-top:clamp(105px,10.2vw,155px)!important;padding:10px 20px!important;font:600 14px Arial,sans-serif!important}
body.te-pe-access-active .te-pe-access-toolbar strong{font:600 15px Arial,sans-serif!important}
body.te-pe-access-active #tePeAccessFrame{flex:1!important;width:100%!important;min-height:0!important;background:transparent!important}
body.te-pe-access-active .te58-admin-iframe{background:transparent!important}
@media(max-width:900px){body.te-pe-access-active #tePeAccessLayer .te-pe-access-paper{width:95vw!important}body.te-pe-access-active .te-pe-access-toolbar{margin-top:100px!important}}
@media(max-width:600px){body.te-pe-access-active #tePeAccessLayer .te-pe-access-paper{width:100vw!important}body.te-pe-access-active .te-pe-access-toolbar{margin-top:72px!important;padding:8px 12px!important}}

/* TE 5.8.2: corrección estructural del panel integrado. */
body.te-pe-access-active #tePeAccessLayer .te-pe-access-paper{width:min(1100px,92vw)!important;min-width:0!important;box-sizing:border-box!important}
body.te-pe-access-active #tePeAccessFrame{display:flex!important;flex-direction:column!important;align-items:stretch!important;min-width:0!important;width:100%!important;box-sizing:border-box!important}
body.te-pe-access-active #tePeAccessFrame .te58-admin-iframe{display:block!important;position:relative!important;flex:1 1 auto!important;align-self:stretch!important;width:100%!important;min-width:0!important;max-width:none!important;height:100%!important;min-height:0!important;margin:0!important;padding:0!important;border:0!important;box-sizing:border-box!important}
@media(max-width:900px){body.te-pe-access-active #tePeAccessLayer .te-pe-access-paper{width:96vw!important}}
