/* ARTURO SEVILLA APP · 20 · NOTIFICACIONES · UI ÚNICA */

/* =========================================================
   AS APP · 11C · PERMISO PUSH · UI

   ÚNICO PROPIETARIO DE:
   - overlay de permiso push
   - tarjeta y botones
   - estados visuales del resultado
   ========================================================= */

/* Base */
#as-push-first-overlay{position:fixed;inset:0;z-index:var(--as-z-permission);background:var(--as-overlay);display:none;align-items:center;justify-content:center;padding:var(--as-space-5);font-family:inherit}
    #as-push-first-card{width:min(92vw,var(--as-app-mobile-width));background:var(--as-white);border-radius:var(--as-radius-lg);padding:26px var(--as-space-6);box-shadow:0 24px 70px var(--as-palette-rgba-0-0-0-0p24);text-align:center;color:var(--as-text-inverse)}
    #as-push-first-card h2{margin:0 0 10px;font-size:var(--as-size-section-title);line-height:1.15;font-weight:700}
    #as-push-first-card p{margin:0 0 var(--as-space-5);font-size:var(--as-size-option-title);line-height:1.5;color:var(--as-text-muted)}
    #as-push-first-actions{display:grid;gap:10px}
    #as-push-first-card button{width:100%;min-height:46px;border-radius:12px;font-size:var(--as-size-option-title);font-weight:700;cursor:pointer}
    #as-push-allow{border:0;background:var(--as-blue-strong);color:var(--as-white)}
    #as-push-later{border:1px solid var(--as-border);background:var(--as-white);color:var(--as-text-inverse)}
    #as-push-first-close{display:none;border:0!important;background:var(--as-blue-strong)!important;color:var(--as-white)!important}
    #as-push-first-card.as-result #as-push-first-actions{display:none}
    #as-push-first-card.as-result #as-push-first-close{display:block}

/* Apariencia dentro de la app */
/* =========================================================
   AS APP · 11C · PERMISO PUSH · UI

   ÚNICA RESPONSABILIDAD:
   - apariencia del aviso inicial de permiso push
   ========================================================= */

body.as-app-ui #as-push-first-card{
  background:var(--as-surface-card)!important;
  color:var(--as-white)!important;
  border:1px solid var(--as-border)!important;
}

body.as-app-ui #as-push-first-card p{color:var(--as-text-muted)!important}

body.as-app-ui #as-push-allow,
body.as-app-ui #as-push-first-close{
  background:var(--as-gold)!important;
  color:var(--as-text-inverse)!important;
}

body.as-app-ui #as-push-later{
  background:var(--as-surface-hover)!important;
  border-color:var(--as-border-control)!important;
  color:var(--as-white)!important;
}


/* =========================================================
   AS APP · 18C1 · NOTIFICACIONES · ESTADO DESHABILITADO

   ÚNICA RESPONSABILIDAD:
   - apariencia/estado visual de los temas deshabilitados
   ========================================================= */

body.as-route-notifications .as-pref-topics-disabled{
  opacity:.48!important;
}

body.as-route-notifications .as-pref-topics-disabled .as-pref-switch-row{
  cursor:not-allowed!important;
}

body.as-route-notifications .as-pref-topics-disabled input[type="checkbox"]{
  pointer-events:none!important;
}


/* =========================================================
   AS APP · 18C2 · NOTIFICACIONES · UI
   ÚNICO PROPIETARIO DE:
   - presentación de Notificaciones
   ========================================================= */

/* === AS APP · NOTIFICATIONS === */

body.as-route-notifications *{box-sizing:border-box}

body.as-route-notifications .as-notif-page{width:min(100%,var(--as-app-mobile-width));margin:0 auto;padding:14px 14px 0;color:var(--as-text);font-family:var(--as-font-ui)}

/* Cabecera Notificaciones: 970 */







body.as-route-notifications .as-notif-source .as-pref-fold.as-notif-real{display:block!important;background:transparent!important;border:0!important;margin:0!important}

body.as-route-notifications .as-notif-source .as-pref-fold.as-notif-real>summary{display:none!important}

body.as-route-notifications .as-notif-source .as-pref-fold.as-notif-real .as-pref-fold-body{display:block!important;padding:0!important;background:transparent!important}

body.as-route-notifications .as-notif-source .as-pref-fold.as-notif-real .as-pref-fold-body>form{
  margin:0!important;
  padding:18px!important;
  background:var(--as-surface)!important;
  border:1px solid var(--as-border)!important;
  border-radius:var(--as-radius-lg)!important;
  box-shadow:0 10px 26px var(--as-palette-rgba-0-0-0-0p18)!important;
  color:var(--as-text)!important;
}

body.as-route-notifications .as-notif-source .as-pref-fold.as-notif-real .as-pref-fold-body>form>div:first-of-type{
  color:var(--as-gold)!important;
  font-size:var(--as-size-body)!important;
  line-height:1.1!important;
  letter-spacing:.14em!important;
  font-weight:800!important;
}

body.as-route-notifications .as-notif-source .as-pref-fold.as-notif-real h2{
  margin:0 0 7px!important;
  color:var(--as-text)!important;
  font:var(--as-weight-semibold) 22px/1.15 var(--as-font-title)!important;
}

body.as-route-notifications 
.as-notif-source .as-pref-fold.as-notif-real p{
  color:var(--as-text-muted)!important;
  font-size:var(--as-size-body)!important;
  line-height:1.45!important;
}

body.as-route-notifications .as-notif-source .as-pref-section-label{
  margin:var(--as-space-5) 0 5px!important;
  color:var(--as-gold)!important;
  font-size:var(--as-size-body)!important;
  line-height:1.1!important;
  letter-spacing:.14em!important;
  font-weight:800!important;
}

body.as-route-notifications .as-notif-source .as-pref-switch-row{
  display:flex!important;
  flex-direction:row!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:14px!important;
  width:100%!important;
  min-height:74px!important;
  padding:13px 0!important;
  border-bottom:1px solid var(--as-border)!important;
}

body.as-route-notifications .as-notif-source .as-pref-switch-row:last-child{border-bottom:0!important}

body.as-route-notifications .as-notif-source .as-pref-switch-text{flex:1 1 auto!important;min-width:0!important}

body.as-route-notifications .as-notif-source .as-pref-switch-text strong{
  display:block!important;
  color:var(--as-text)!important;
  font-size:var(--as-size-option-title)!important;
  line-height:1.2!important;
  font-weight:700!important;
}

body.as-route-notifications .as-notif-source .as-pref-switch-text span{
  display:block!important;
  margin-top:var(--as-space-1)!important;
  color:var(--as-text-secondary)!important;
  font-size:var(--as-size-body)!important;
  line-height:1.35!important;
}

body.as-route-notifications .as-notif-source #as-pref-no-channel{
  margin:10px 0 var(--as-space-1)!important;
  padding:var(--as-space-3) 13px!important;
  border:1px solid var(--as-gold-border)!important;
  border-radius:12px!important;
  background:var(--as-gold-surface-2)!important;
  color:var(--as-gold-muted)!important;
  font-size:var(--as-size-small)!important;
}

body.as-route-notifications .as-notif-source button[type="submit"]{
  width:100%!important;
  min-height:50px!important;
  margin-top:var(--as-space-4)!important;
  padding:13px var(--as-space-4)!important;
  border:0!important;
  border-radius:var(--as-radius-md)!important;
  background:var(--as-gold)!important;
  color:var(--as-text-inverse)!important;
  font-size:var(--as-size-option-title)!important;
  font-weight:800!important;
}

body.as-route-notifications .as-notif-source input[type="checkbox"]{
  -webkit-appearance:none!important;
  appearance:none!important;
  position:relative!important;
  flex:0 0 46px!important;
  width:46px!important;
  height:26px!important;
  min-width:46px!important;
  min-height:26px!important;
  max-width:46px!important;
  max-height:26px!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:var(--as-radius-round)!important;
  background:var(--as-border-control)!important;
  box-shadow:inset 0 0 0 1px var(--as-border-hover)!important;
  vertical-align:middle!important;
  overflow:hidden!important;
}

body.as-route-notifications .as-notif-source input[type="checkbox"]::before{display:none!important}

body.as-route-notifications .as-notif-source input[type="checkbox"]::after{
  content:""!important;
  position:absolute!important;
  display:block!important;
  top:3px!important;
  left:3px!important;
  width:20px!important;
  height:20px!important;
  border-radius:50%!important;
  background:var(--as-white)!important;
  box-shadow:0 1px 3px var(--as-palette-rgba-0-0-0-0p35)!important;
  transform:translateX(0)!important;
  transition:transform .18s ease!important;
}

body.as-route-notifications .as-notif-source input[type="checkbox"]:checked{
  background:var(--as-gold)!important;
  box-shadow:none!important;
}

body.as-route-notifications .as-notif-source input[type="checkbox"]:checked::after{
  transform:translateX(20px)!important;
}

/* === /AS APP · NOTIFICATIONS === */


/* ARTURO SEVILLA APP · 21 · HEADER BELL
   Sistema totalmente nuevo.
   La campana pertenece físicamente a la cabecera de cada pantalla.
   No usa fixed, sticky ni JS de geometría.
*/

.as-header-bell-slot{
  position:absolute!important;
  z-index:var(--as-z-sticky)!important;
  width:44px!important;
  height:44px!important;
  margin:0!important;
  padding:0!important;
}

.as-header-bell-button{
  width:44px!important;
  height:44px!important;
  min-width:44px!important;
  min-height:44px!important;
  margin:0!important;
  padding:0!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  border:1px solid var(--as-gold)!important;
  border-radius:50%!important;
  background:var(--as-white)!important;
  color:var(--as-light-text)!important;
  box-shadow:var(--as-shadow-float)!important;
  cursor:pointer!important;
  position:relative!important;
}

.as-header-bell-icon{
  display:block!important;
  width:22px!important;
  height:22px!important;
  background:currentColor!important;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 8a6 6 0 0 0-12 0c0 7-3 7-3 9h18c0-2-3-2-3-9'/%3E%3Cpath d='M10 21h4'/%3E%3C/svg%3E") center/contain no-repeat!important;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 8a6 6 0 0 0-12 0c0 7-3 7-3 9h18c0-2-3-2-3-9'/%3E%3Cpath d='M10 21h4'/%3E%3C/svg%3E") center/contain no-repeat!important;
}

.as-header-bell-count{
  position:absolute!important;
  top:-4px!important;
  right:-4px!important;
  min-width:20px!important;
  height:20px!important;
  padding:0 5px!important;
  box-sizing:border-box!important;
  border:2px solid var(--as-white)!important;
  border-radius:var(--as-radius-round)!important;
  background:var(--as-danger)!important;
  color:var(--as-white)!important;
  font-size:var(--as-size-kicker)!important;
  font-weight:800!important;
  line-height:16px!important;
  text-align:center!important;
}

html.as-theme-dark .as-header-bell-button{
  background:var(--as-black)!important;
  color:var(--as-white)!important;
}
html.as-theme-dark .as-header-bell-count{
  border-color:var(--as-black)!important;
}

html.as-theme-dark #as-header-bell-panel{
  background:var(--as-palette-0b0b0b)!important;
  color:var(--as-white)!important;
  border-color:var(--as-palette-2a2a2a)!important;
  box-shadow:0 18px 50px var(--as-palette-rgba-0-0-0-0p58)!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
}

html.as-theme-dark .as-header-bell-panel-head,
html.as-theme-dark .as-header-bell-panel-foot{
  background:var(--as-palette-0b0b0b)!important;
  border-color:var(--as-palette-242424)!important;
}

html.as-theme-dark .as-header-bell-item{
  background:var(--as-palette-151515)!important;
  color:var(--as-white)!important;
  border-color:var(--as-palette-262626)!important;
}

html.as-theme-dark .as-header-bell-heading{
  color:var(--as-white)!important;
}

html.as-theme-dark .as-header-bell-message,
html.as-theme-dark .as-header-bell-time,
html.as-theme-dark .as-header-bell-empty{
  color:var(--as-palette-b8b8b8)!important;
}

/* INICIO
   Centro exacto especular respecto al logo:
   escritorio: logo 82px @ top 28 / left 30 -> centro 69Y / 71X
   campana 44px -> top 47 / right 49 */
body.as-route-home .as-hero .as-header-bell-slot{
  top:47px!important;
  right:49px!important;
}

/* Móvil:
   logo 66px @ top 16 / left 16 -> centro 49Y / 49X
   campana 44px -> top 27 / right 27 */
@media(max-width:699px){
  body.as-route-home .as-hero .as-header-bell-slot{
    top:27px!important;
    right:27px!important;
  }
}

/* VÍDEOS/FAVORITOS
   La campana vive DENTRO del mismo bloque de 92px que el título
   y queda centrada verticalmente en esa cabecera. */
body.as-route-videos .as-videos-head>div:first-child{
  position:relative!important;
}
body.as-route-videos .as-videos-head>div:first-child .as-header-bell-slot{
  top:50%!important;
  right:16px!important;
  transform:translateY(-50%)!important;
}

/* MI CUENTA: dentro del hero */
body.as-route-account .asx-hero{
  position:relative!important;
}
body.as-route-account .asx-hero .as-header-bell-slot{
  top:22px!important;
  right:22px!important;
}

/* Panel: separado de la geometría de la campana */
#as-header-bell-panel{
  position:fixed!important;
  top:92px!important;
  left:50%!important;
  width:min(calc(100vw - 20px),390px)!important;
  max-height:min(72dvh,620px)!important;
  box-sizing:border-box!important;
  background:var(--as-surface-card)!important;
  color:var(--as-text)!important;
  border:1px solid var(--as-border)!important;
  border-radius:18px!important;
  box-shadow:var(--as-shadow-float)!important;
  overflow:hidden!important;
  opacity:0!important;
  visibility:hidden!important;
  pointer-events:none!important;
  transform:translateX(-50%)!important;
  z-index:var(--as-z-bell-panel)!important;
}

#as-header-bell-panel.is-open{
  opacity:1!important;
  visibility:visible!important;
  pointer-events:auto!important;
}

.as-header-bell-panel-head{
  min-height:54px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:var(--as-space-3) var(--as-space-4);
  border-bottom:1px solid var(--as-border-soft)!important;
}
.as-header-bell-panel-actions{display:flex;align-items:center;gap:8px;margin-left:auto;}
#as-header-bell-close{display:grid;place-items:center;flex:0 0 36px;width:36px;height:36px;padding:0;border:1px solid var(--as-border);border-radius:50%;background:transparent;color:var(--as-text);font:400 25px/1 system-ui,sans-serif;cursor:pointer;}
#as-header-bell-close:focus-visible{outline:2px solid var(--as-gold);outline-offset:2px;}
.as-header-bell-panel-title{
  font-family:var(--as-font-title);
  font-size:var(--as-size-subheading);
  font-weight:700;
}
#as-header-bell-read-all{
  min-height:32px;
  padding:0 11px;
  border:1px solid var(--as-gold)!important;
  border-radius:var(--as-radius-round)!important;
  background:transparent!important;
  color:var(--as-gold)!important;
  font-size:11px!important;
  font-weight:800!important;
  cursor:pointer;
  white-space:nowrap;
}
#as-header-bell-read-all[hidden]{display:none!important}
#as-header-bell-read-all:disabled{opacity:.55!important;cursor:default}
.as-header-bell-list{
  max-height:calc(min(72dvh,620px) - 108px);
  overflow:auto;
  padding:10px;
}
.as-header-bell-item{
  display:flex;
  gap:11px;
  margin:0 0 var(--as-space-2);
  padding:var(--as-space-3);
  text-decoration:none!important;
  background:var(--as-surface-2)!important;
  color:var(--as-text)!important;
  border:1px solid var(--as-border)!important;
  border-radius:var(--as-radius-md)!important;
}
.as-header-bell-item.is-read{
  opacity:.68!important;
}
.as-header-bell-item.is-unread{
  opacity:1!important;
  border-color:var(--as-gold)!important;
  box-shadow:inset 3px 0 0 var(--as-gold)!important;
}
.as-header-bell-state{
  align-self:flex-start;
  flex:0 0 auto;
  margin-left:4px;
  padding:3px 7px;
  border-radius:var(--as-radius-round)!important;
  font-size:10px!important;
  line-height:1.2!important;
  font-weight:800!important;
  letter-spacing:.02em!important;
  white-space:nowrap;
}
.as-header-bell-state.is-unread-state{
  background:var(--as-gold)!important;
  color:var(--as-text-inverse)!important;
}
.as-header-bell-state.is-read-state{
  background:transparent!important;
  color:var(--as-text-dim)!important;
  border:1px solid var(--as-border)!important;
}
.as-header-bell-item-icon{
  width:38px;
  height:38px;
  flex:0 0 38px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:50%;
  background:var(--as-gold-surface-2)!important;
}
.as-header-bell-copy{min-width:0;flex:1}
.as-header-bell-heading{display:block;font-size:var(--as-size-ui);font-weight:700}
.as-header-bell-message{display:block;margin-top:3px;font-size:var(--as-size-body);line-height:1.35;color:var(--as-text-muted)!important}
.as-header-bell-time{display:block;margin-top:var(--as-space-1);font-size:var(--as-size-meta);color:var(--as-text-dim)!important}
.as-header-bell-empty{
  padding:var(--as-space-6) 18px;
  text-align:center;
  font-size:var(--as-size-body);
  color:var(--as-text-muted)!important;
}
.as-header-bell-panel-foot{
  min-height:54px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:var(--as-space-2) var(--as-space-3);
  border-top:1px solid var(--as-border-soft)!important;
}
#as-header-bell-more{
  min-height:38px;
  padding:0 18px;
  border:1px solid var(--as-gold)!important;
  border-radius:var(--as-radius-round)!important;
  background:transparent!important;
  color:var(--as-gold)!important;
  font-weight:700!important;
}
#as-header-bell-more[hidden]{display:none!important}
