/* =========================================================
   Live Calendar — components.css
   Общие UI-компоненты:
   кнопки, панели, поля, select, toast, preview, footer
========================================================= */

/* =========================
   Panels
========================= */

.panel{
  background:var(--panel, rgba(255,255,255,.04));
  border-radius:22px;
  padding:16px;
  box-shadow:
    0 18px 50px rgba(0,0,0,.35),
    inset 0 1px 0 rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.055);
}

.card{
  background:var(--panel, rgba(255,255,255,.04));
  border:1px solid rgba(255,255,255,.10);
  border-radius:22px;
  padding:16px;
  box-shadow:
    0 18px 50px rgba(0,0,0,.35),
    inset 0 1px 0 rgba(255,255,255,.06);
}

.softCard{
  background:rgba(255,255,255,.025);
  border:1px solid rgba(255,255,255,.08);
  border-radius:18px;
  padding:14px;
}

/* =========================
   Labels / text
========================= */

.label{
  font-size:14px;
  color:rgba(255,255,255,.78);
  margin-bottom:6px;
  font-weight:650;
}

.labelSmall{
  margin:0 0 6px;
  color:rgba(255,255,255,.72);
  font-size:13px;
  font-weight:650;
}

.hint{
  font-size:12px;
  color:rgba(255,255,255,.55);
  margin-top:6px;
  line-height:1.4;
}

.muted{
  color:var(--muted, rgba(255,255,255,.72));
}

.muted2{
  color:var(--muted2, rgba(255,255,255,.55));
}

.mono,
.monoSmall{
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
}

.monoSmall{
  font-size:12px;
}

/* =========================
   Buttons
========================= */

.btn{
  border:1px solid rgba(255,255,255,.20);
  background:rgba(255,255,255,.06);
  border-radius:999px;
  padding:14px 16px;
  font-weight:850;
  cursor:pointer;
  text-align:center;
  color:#fff;
  text-decoration:none;
  user-select:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:48px;
  transition:
    border-color .18s var(--ease, cubic-bezier(.2,.8,.2,1)),
    background .18s var(--ease, cubic-bezier(.2,.8,.2,1)),
    transform .18s var(--ease, cubic-bezier(.2,.8,.2,1)),
    opacity .18s ease;
}

.btn:hover{
  border-color:rgba(255,255,255,.30);
  background:rgba(255,255,255,.075);
  text-decoration:none;
}

.btn:active{
  transform:translateY(1px);
}

.btn:disabled,
.btn[aria-disabled="true"]{
  opacity:.6;
  cursor:not-allowed;
  pointer-events:none;
}

.btnGhost{
  background:rgba(255,255,255,.03);
}

.btnAccent{
  border-color:rgba(138,180,255,.45);
  background:rgba(138,180,255,.14);
}

.btnAccent:hover{
  border-color:rgba(138,180,255,.65);
  background:rgba(138,180,255,.18);
}

.miniBtn{
  padding:12px 14px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.16);
  background:rgba(255,255,255,.03);
  color:#fff;
  font-weight:800;
  cursor:pointer;
  white-space:nowrap;
  transition:
    border-color .18s var(--ease, cubic-bezier(.2,.8,.2,1)),
    background .18s var(--ease, cubic-bezier(.2,.8,.2,1)),
    transform .18s var(--ease, cubic-bezier(.2,.8,.2,1)),
    opacity .18s ease;
}

.miniBtn:hover{
  border-color:rgba(255,255,255,.26);
  background:rgba(255,255,255,.05);
}

.miniBtn:active{
  transform:translateY(1px);
}

.miniBtn:disabled{
  opacity:.55;
  cursor:not-allowed;
  pointer-events:none;
}

/* =========================
   Form fields
========================= */

.field{
  margin-bottom:14px;
}

input[type="text"],
input[type="date"],
input[type="email"],
input[type="number"],
input[type="password"],
input[type="search"],
input[type="url"],
textarea,
input[type="file"]{
  width:100%;
  padding:14px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.16);
  background:var(--input, rgba(255,255,255,.04));
  color:#fff;
  font-size:16px;
  transition:
    border-color .18s ease,
    box-shadow .18s ease,
    background .18s ease;
}

input[type="text"]:focus,
input[type="date"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="url"]:focus,
textarea:focus,
input[type="file"]:focus{
  outline:none;
  border-color:rgba(138,180,255,.55);
  box-shadow:0 0 0 4px rgba(138,180,255,.12);
}

input::placeholder,
textarea::placeholder{
  color:rgba(255,255,255,.38);
}

textarea{
  min-height:120px;
  resize:vertical;
  line-height:1.4;
}

input[type="range"]{
  width:100%;
  accent-color:#8ab4ff;
}

input[type="file"]::file-selector-button{
  margin-right:12px;
  border:1px solid rgba(255,255,255,.18);
  background:rgba(255,255,255,.06);
  color:#fff;
  border-radius:999px;
  padding:8px 12px;
  font-weight:800;
  cursor:pointer;
}

/* =========================
   Color picker
========================= */

.colorBox{
  border:1px solid rgba(255,255,255,.10);
  border-radius:16px;
  padding:12px;
  background:var(--panel2, rgba(255,255,255,.02));
}

.colorPick{
  display:flex;
  gap:10px;
  align-items:center;
}

.colorPick input[type="color"]{
  width:44px;
  height:44px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.16);
  background:transparent;
  padding:0;
  cursor:pointer;
  overflow:hidden;
}

.colorPick input[type="color"]::-webkit-color-swatch-wrapper{
  padding:0;
}

.colorPick input[type="color"]::-webkit-color-swatch{
  border:0;
  border-radius:12px;
}

.colorPick input[type="color"]::-moz-color-swatch{
  border:0;
  border-radius:12px;
}

.hex{
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  font-size:12px;
  color:rgba(255,255,255,.70);
  margin-top:2px;
}

/* =========================
   Custom select
========================= */

.cs{
  position:relative;
}

.csBtn{
  width:100%;
  padding:14px 44px 14px 14px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.16);
  background:var(--input, rgba(255,255,255,.04));
  color:#fff;
  font-size:16px;
  text-align:left;
  cursor:pointer;
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:space-between;
  transition:
    border-color .18s ease,
    box-shadow .18s ease,
    background .18s ease;
}

.csBtn:hover{
  border-color:rgba(255,255,255,.24);
  background:rgba(255,255,255,.05);
}

.csBtn:focus{
  outline:none;
  border-color:rgba(138,180,255,.55);
  box-shadow:0 0 0 4px rgba(138,180,255,.12);
}

.csValue{
  flex:1;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.csChevron{
  width:18px;
  height:18px;
  flex:0 0 auto;
  opacity:.85;
  color:#fff;
  transition:transform .18s ease;
}

.cs.open .csChevron{
  transform:rotate(180deg);
}

.csPop{
  position:absolute;
  top:calc(100% + 8px);
  left:0;
  right:0;
  z-index:50;
  border-radius:18px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(12,14,18,.96);
  box-shadow:0 22px 70px rgba(0,0,0,.55);
  overflow:hidden;
  transform-origin:top;
  display:none;
}

.cs.open .csPop{
  display:block;
}

.csSearch{
  padding:10px 10px 8px;
  border-bottom:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.02);
}

.csSearch input{
  width:100%;
  padding:12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.04);
  color:#fff;
  font-size:14px;
}

.csSearch input:focus{
  outline:none;
  border-color:rgba(138,180,255,.55);
  box-shadow:none;
}

.csList{
  max-height:320px;
  overflow:auto;
  padding:6px;
}

.csItem{
  width:100%;
  border:1px solid transparent;
  background:transparent;
  color:#fff;
  padding:12px;
  border-radius:14px;
  cursor:pointer;
  text-align:left;
  display:flex;
  justify-content:space-between;
  gap:10px;
  transition:
    border-color .15s ease,
    background .15s ease;
}

.csItem:hover{
  background:rgba(255,255,255,.05);
  border-color:rgba(255,255,255,.08);
}

.csItem[aria-selected="true"]{
  background:rgba(138,180,255,.14);
  border-color:rgba(138,180,255,.32);
}

.csRight{
  color:rgba(255,255,255,.55);
  font-size:12px;
  align-self:center;
  white-space:nowrap;
}

.csEmpty{
  color:rgba(255,255,255,.55);
  font-size:13px;
  padding:14px 12px;
}

/* =========================
   Pills / badges
========================= */

.badge,
.statusBadge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.04);
  color:#fff;
  font-size:12px;
  font-weight:800;
}

.badgeOk{
  color:#6CFFB2;
  border-color:rgba(108,255,178,.35);
}

.badgeWarn{
  color:#FFD56C;
  border-color:rgba(255,213,108,.35);
}

.badgeBad{
  color:#FF6B6B;
  border-color:rgba(255,107,107,.35);
}

/* =========================
   Preview component
========================= */

.previewPanel{
  margin-top:14px;
  padding:14px;
}

.previewBox{
  position:relative;
  border:1px solid rgba(255,255,255,.12);
  border-radius:20px;
  background:rgba(255,255,255,.02);
  overflow:hidden;
  min-height:320px;
  display:grid;
  place-items:center;
}

.previewBox img{
  width:100%;
  height:auto;
  display:block;
}

.previewBadge{
  position:absolute;
  top:10px;
  left:10px;
  font-size:12px;
  color:#cfcfcf;
  background:rgba(0,0,0,.38);
  border:1px solid rgba(255,255,255,.12);
  padding:6px 10px;
  border-radius:999px;
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  z-index:5;
}

.previewMeta{
  margin-top:10px;
  display:flex;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
  font-size:12px;
  color:rgba(255,255,255,.55);
}

.previewMeta .monoSmall{
  color:rgba(255,255,255,.65);
}

.previewLayer{
  position:absolute;
  inset:0;
  background-position:center;
  background-size:cover;
  transform:scale(1.01);
  z-index:0;
}

.previewDim{
  position:absolute;
  inset:0;
  z-index:1;
  pointer-events:none;
}

.previewImgTop{
  position:relative;
  z-index:2;
}

/* =========================
   Toast
========================= */

.toast{
  position:fixed;
  left:50%;
  bottom:18px;
  transform:translateX(-50%);
  background:rgba(10,10,10,.82);
  border:1px solid rgba(255,255,255,.16);
  color:#fff;
  padding:10px 14px;
  border-radius:999px;
  font-size:13px;
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
  box-shadow:0 18px 50px rgba(0,0,0,.45);
  opacity:0;
  pointer-events:none;
  transition:
    opacity .2s ease,
    transform .2s ease;
  z-index:100;
}

.toast.show{
  opacity:1;
  transform:translateX(-50%) translateY(-4px);
}

/* =========================
   Lists
========================= */

.list{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.listItem{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:center;
  padding:10px 12px;
  border-radius:16px;
  background:rgba(255,255,255,.035);
  border:1px solid rgba(255,255,255,.08);
}

.listKey{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:#fff;
}

.listVal{
  flex:0 0 auto;
  color:rgba(255,255,255,.58);
  font-weight:700;
}

/* =========================
   Utility components
========================= */

.dividerLine{
  height:1px;
  background:linear-gradient(
    90deg,
    transparent,
    rgba(255,255,255,.10),
    transparent
  );
  border-radius:999px;
}

.emptyText{
  color:rgba(255,255,255,.48);
  font-size:13px;
}

.loadingText{
  color:rgba(255,255,255,.55);
  font-size:13px;
}

/* =========================
   Responsive
========================= */

@media(max-width:520px){
  .panel,
  .card{
    padding:16px;
    border-radius:20px;
  }

  .btn{
    width:100%;
  }

  .rowInline{
    flex-direction:column;
  }

  .previewMeta{
    flex-direction:column;
  }
}