/* SEHL-MAIL-MEDIA-THEME-SYNC-V1 */
/* SEHL-WEBMAIL-MEDIA-DESKTOP-V21 */

.att.sehl-media-card{
  position:relative;
  display:grid!important;
  grid-template-columns:minmax(96px,132px) 1fr 32px;
  align-items:center;
  gap:10px;
  min-width:0;
  overflow:hidden;
  padding:7px!important;
  border-radius:11px;
  cursor:pointer
}

.att.sehl-media-card .sehl-media-old-icon{
  display:none!important
}

.sehl-media-thumb{
  position:relative;
  width:100%;
  height:84px;
  display:grid;
  place-items:center;
  overflow:hidden;
  border-radius:8px;
  background:color-mix(in srgb,var(--ink) 9%,var(--surface-2))
}

.sehl-media-thumb>span{
  font-size:9px;
  font-weight:800;
  letter-spacing:.12em;
  opacity:.7
}

.sehl-media-thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block
}

.sehl-media-loading::after{
  content:"";
  position:absolute;
  width:18px;
  height:18px;
  border-radius:50%;
  border:2px solid color-mix(in srgb,var(--ink) 15%,transparent);
  border-top-color:var(--accent,#d5ae63);
  animation:sehlMediaSpin .8s linear infinite
}

.sehl-media-loading>span{
  opacity:0
}

@keyframes sehlMediaSpin{
  to{transform:rotate(360deg)}
}

.sehl-media-card .nm2{
  min-width:0
}

.sehl-media-card .nm2 b,
.sehl-media-card .nm2 small{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap
}

.sehl-media-download{
  width:28px;
  height:28px;
  display:grid;
  place-items:center;
  border-radius:8px;
  border:1px solid var(--line,rgba(255,255,255,.10));
  background:color-mix(in srgb,var(--ink) 7%,transparent);
  cursor:pointer;
  user-select:none
}

.sehl-media-download:hover{
  border-color:var(--accent,#d5ae63)
}

.sehl-media-kind-image{
  background:linear-gradient(135deg,rgba(80,128,175,.20),rgba(0,0,0,.10))
}

.sehl-media-kind-pdf{
  background:linear-gradient(135deg,rgba(180,72,72,.19),rgba(0,0,0,.10))
}

.sehl-media-kind-audio{
  background:linear-gradient(135deg,rgba(120,86,180,.20),rgba(0,0,0,.10))
}

.sehl-media-kind-video{
  background:linear-gradient(135deg,rgba(66,145,130,.20),rgba(0,0,0,.10))
}

.sehl-media-kind-text,
.sehl-media-kind-file{
  background:linear-gradient(135deg,rgba(132,140,150,.18),rgba(0,0,0,.10))
}

.cwatt.sehl-cw-media-card{
  display:inline-flex!important;
  align-items:center;
  gap:7px;
  cursor:pointer
}

.cwatt.sehl-cw-media-card .sehl-media-old-icon{
  display:none!important
}

.cwatt.sehl-cw-media-card .sehl-media-thumb{
  width:46px;
  height:46px;
  flex:0 0 46px
}

body.sehl-media-open{
  overflow:hidden
}

.sehl-media-viewer{
  position:fixed;
  inset:0;
  z-index:2147483000;
  background:rgba(5,8,13,.95);
  backdrop-filter:blur(14px)
}

.sehl-media-viewer.hidden{
  display:none!important
}

.sehl-media-viewer-shell{
  width:100%;
  height:100%;
  display:grid;
  grid-template-rows:auto 1fr auto
}

.sehl-media-viewer-head{
  display:flex;
  align-items:center;
  gap:14px;
  padding:11px 14px;
  border-bottom:1px solid rgba(255,255,255,.09);
  background:rgba(14,19,27,.86)
}

.sehl-media-viewer-title{
  flex:1;
  min-width:0;
  display:flex;
  flex-direction:column
}

.sehl-media-viewer-title b{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:13px
}

.sehl-media-viewer-title small{
  margin-top:2px;
  color:rgba(255,255,255,.50);
  font-size:10px
}

.sehl-media-viewer-tools{
  display:flex;
  gap:5px
}

.sehl-media-viewer-tools button,
.sehl-media-nav{
  border:1px solid rgba(255,255,255,.11);
  background:rgba(255,255,255,.055);
  color:rgba(255,255,255,.91);
  cursor:pointer
}

.sehl-media-viewer-tools button{
  width:34px;
  height:34px;
  border-radius:9px
}

.sehl-media-viewer-tools button:hover,
.sehl-media-nav:hover{
  border-color:var(--accent,#d5ae63);
  background:rgba(255,255,255,.10)
}

.sehl-media-viewer-tools button:disabled{
  opacity:.28;
  cursor:default
}

.sehl-media-viewer-stage{
  min-width:0;
  min-height:0;
  overflow:hidden;
  display:grid;
  grid-template-columns:52px 1fr 52px
}

.sehl-media-viewer-content{
  min-width:0;
  min-height:0;
  display:grid;
  place-items:center;
  overflow:auto;
  padding:24px
}

.sehl-media-viewer-image{
  display:block;
  max-width:94%;
  max-height:calc(100vh - 145px);
  object-fit:contain;
  transform-origin:center;
  transition:transform .16s ease;
  box-shadow:0 18px 60px rgba(0,0,0,.35)
}

.sehl-media-viewer-pdf{
  width:min(1100px,96%);
  height:calc(100vh - 155px);
  border:0;
  border-radius:8px;
  background:#fff
}

.sehl-media-viewer-video{
  max-width:94%;
  max-height:calc(100vh - 155px);
  border-radius:10px;
  background:#000
}

.sehl-media-viewer-audio{
  width:min(680px,92%)
}

.sehl-media-viewer-text{
  width:min(1000px,94%);
  max-height:calc(100vh - 165px);
  overflow:auto;
  margin:0;
  padding:18px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(16,21,30,.86);
  color:rgba(255,255,255,.88);
  white-space:pre-wrap;
  word-break:break-word;
  font-size:12px;
  line-height:1.55
}

.sehl-media-nav{
  width:38px;
  height:72px;
  align-self:center;
  justify-self:center;
  border-radius:12px;
  font-size:32px
}

.sehl-media-nav:disabled{
  visibility:hidden
}

.sehl-media-viewer-foot{
  min-height:38px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  padding:7px 15px;
  border-top:1px solid rgba(255,255,255,.08);
  background:rgba(14,19,27,.86);
  color:rgba(255,255,255,.48);
  font-size:10px
}

.sehl-media-viewer-loading{
  display:grid;
  place-items:center;
  min-height:220px
}

.sehl-media-generic{
  min-width:min(440px,88vw);
  display:grid;
  justify-items:center;
  gap:8px;
  padding:34px;
  border:1px solid rgba(255,255,255,.10);
  border-radius:14px;
  background:rgba(255,255,255,.04);
  text-align:center
}

.sehl-media-generic>span{
  min-width:66px;
  padding:12px 14px;
  border-radius:10px;
  background:rgba(255,255,255,.08);
  font-weight:800;
  font-size:12px;
  letter-spacing:.08em
}

.sehl-media-generic small,
.sehl-media-generic p{
  color:rgba(255,255,255,.50)
}

@media(max-width:760px){

  .att.sehl-media-card{
    grid-template-columns:76px 1fr 30px
  }

  .sehl-media-thumb{
    height:66px
  }

  .sehl-media-viewer-stage{
    grid-template-columns:38px 1fr 38px
  }

  .sehl-media-viewer-content{
    padding:12px 4px
  }

  .sehl-media-viewer-head{
    padding:8px
  }

  .sehl-media-viewer-tools button{
    width:31px;
    height:31px
  }

  .sehl-media-viewer-foot span:last-child{
    display:none
  }

  .sehl-media-viewer-pdf{
    width:100%;
    height:calc(100vh - 130px)
  }
}
