/* =========================================================
   Live Calendar — create.css
   Только стили страницы /create.
   Общие стили лежат в:
   base.css, layout.css, components.css
========================================================= */

/* =========================
   Page background
========================= */

body{
  background:
    radial-gradient(900px 520px at 50% -120px, rgba(138,180,255,.10), transparent 62%),
    radial-gradient(620px 340px at 50% 100%, rgba(255,106,61,.055), transparent 68%),
    var(--bg);
}

/* =========================
   Create page heading
========================= */

.main{
  max-width:720px;
}

.h1{
  font-size:44px;
  letter-spacing:-.045em;
  margin:0 0 8px;
}

.sub{
  color:var(--muted);
  font-size:15px;
  line-height:1.55;
  margin:0 0 18px;
}

/* =========================
   Mode switcher
========================= */

.modeRow{
  display:flex;
  gap:12px;
  margin:14px 0 10px;
}

.modeBtn{
  border:1px solid rgba(255,255,255,.20);
  background:rgba(255,255,255,.04);
  border-radius:999px;
  padding:12px 12px;
  font-weight:800;
  cursor:pointer;
  color:#fff;
  min-width:140px;
  transition:
    border-color .18s var(--ease),
    background .18s var(--ease),
    transform .18s var(--ease),
    box-shadow .18s var(--ease);
}

.modeBtn:hover{
  border-color:rgba(255,255,255,.30);
  background:rgba(255,255,255,.055);
}

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

.modeBtn.active{
  border-color:rgba(138,180,255,.6);
  background:rgba(138,180,255,.12);
  box-shadow:
    0 0 0 1px rgba(138,180,255,.08) inset,
    0 10px 30px rgba(80,120,255,.08);
}

.modeHint{
  color:var(--muted2);
  font-size:13px;
  margin-bottom:14px;
}

/* =========================
   Create panels
========================= */

#panelSimple,
#panelPro,
#panelBeta,
#panelPreview{
  animation:createPanelIn .22s var(--ease) both;
}

@keyframes createPanelIn{
  from{
    opacity:0;
    transform:translateY(6px);
  }
  to{
    opacity:1;
    transform:translateY(0);
  }
}

/* =========================
   Form layout tweaks
========================= */

.field:last-child{
  margin-bottom:0;
}

#panelPro .field:last-of-type{
  margin-bottom:14px;
}

.colorGrid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}

.colorBox{
  min-height:70px;
}

.colorPick > div:last-child{
  min-width:0;
}

.colorPick > div:last-child > div:first-child{
  font-size:14px;
  font-weight:700;
  color:rgba(255,255,255,.86);
}

/* =========================
   Custom select fixes for create
========================= */

.cs{
  width:100%;
}

.csPop{
  max-height:min(420px, 70vh);
}

.csList{
  max-height:320px;
}

#csPresetSimple .csList,
#csPresetPro .csList,
#csTzSimple .csList,
#csTzPro .csList{
  max-height:360px;
}

/* =========================
   Holiday section
========================= */

#holCustom{
  display:none;
}

#myDatesList{
  margin-top:10px;
}

.myDatesList{
  margin-top:10px;
}

.myDateRow{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;

  padding:10px 12px;
  margin-bottom:8px;

  border:1px solid rgba(255,255,255,.12);
  border-radius:16px;

  background:rgba(255,255,255,.025);
}

.myDateText{
  flex:1;
  min-width:0;

  word-break:break-word;

  font-size:13px;
  line-height:1.35;

  color:rgba(255,255,255,.86);
}

.myDateDot{
  display:inline-block;

  width:10px;
  height:10px;

  border-radius:999px;

  margin-right:8px;

  vertical-align:middle;

  box-shadow:0 0 14px currentColor;
}

.myDateActions{
  display:flex;
  align-items:center;
  gap:8px;
  flex-shrink:0;
}

.myDateActions .miniBtn{
  padding:9px 11px;
  font-size:12px;
}

.emptyText{
  padding:10px 12px;
  border:1px dashed rgba(255,255,255,.12);
  border-radius:14px;
  background:rgba(255,255,255,.018);
  color:rgba(255,255,255,.48);
  font-size:13px;
}

/* =========================
   Beta panel
========================= */

#panelBeta .hint:first-child{
  margin-top:0;
}

#bgDimVal,
#bgBlurVal{
  font-weight:800;
  color:#fff;
}

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

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

.previewBox{
  min-height:320px;
  isolation:isolate;
}

.previewBox::before{
  content:"";
  position:absolute;
  inset:0;
  z-index:0;
  pointer-events:none;

  background:
    radial-gradient(circle at 50% 20%, rgba(255,255,255,.04), transparent 42%),
    linear-gradient(180deg, rgba(255,255,255,.025), transparent);

  opacity:.9;
}

.previewLayer{
  position:absolute;
  inset:0;
  z-index:0;

  background-position:center;
  background-size:cover;

  transform:scale(1.01);
}

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

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

#previewImg{
  width:100%;
  height:auto;
  display:block;
}

.previewBadge{
  z-index:6;
}

.previewMeta{
  margin-top:10px;
}

#previewMetaRight{
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

/* =========================
   Open buttons
========================= */

#openSimple,
#openPro{
  color:#fff;
}

#copySimple,
#copyPro{
  position:relative;
}

/* =========================
   Footer tweaks
========================= */

.footer{
  margin-top:24px;
}

.footerLinks{
  gap:14px;
}

/* =========================
   Loading / error states
========================= */

.previewBadge{
  transition:
    background .18s ease,
    border-color .18s ease,
    color .18s ease;
}

.previewBadge:has-text("ошибка"){
  color:#ffb3b3;
}

/* Safari/Firefox do not support :has-text; real state is text-only.
   Оставлено без влияния, безопасно игнорируется. */

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

@media(max-width:700px){
  .split3{
    grid-template-columns:1fr;
  }
}

@media(max-width:560px){
  .main{
    padding-top:18px;
  }

  .h1{
    font-size:42px;
  }

  .modeRow{
    gap:8px;
  }

  .modeBtn{
    min-width:0;
    flex:1;
    padding:11px 10px;
    font-size:13px;
  }

  .colorGrid{
    grid-template-columns:1fr;
  }

  .previewBox{
    min-height:280px;
  }

  .myDateRow{
    align-items:flex-start;
    flex-direction:column;
  }

  .myDateActions{
    width:100%;
  }

  .myDateActions .miniBtn{
    flex:1;
  }

  #previewMetaRight{
    white-space:normal;
  }
}

@media(max-width:390px){
  .h1{
    font-size:36px;
  }

  .modeBtn{
    font-size:12px;
    padding:10px 8px;
  }

  .previewBox{
    min-height:240px;
  }
}

/* =========================
   Reduced motion
========================= */

@media(prefers-reduced-motion:reduce){
  #panelSimple,
  #panelPro,
  #panelBeta,
  #panelPreview{
    animation:none;
  }
}
.shareBox{
  margin-top:14px;
  padding:14px;
  border-radius:18px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.035);
}

.shareBox.hidden{
  display:none;
}

.shareTitle{
  font-weight:800;
  font-size:14px;
  margin-bottom:10px;
  color:rgba(255,255,255,.9);
}

.shareBox input{
  width:100%;
  margin-bottom:12px;
  font-size:13px;
  font-family:var(--mono);
}

.shareActions{
  display:flex;
  gap:10px;
}

.shareActions .miniBtn{
  flex:1;
  text-align:center;
  text-decoration:none;
}