:root {
    --wvs-card: #fffdfa;
    --wvs-text: #172033;
    --wvs-muted: #667085;
    --wvs-line: #deded8;
    --wvs-accent: #3468f5;
    --wvs-accent-dark: #2856d2;
    --wvs-radius: 20px;
}

.wv-schedule,
.wv-schedule * { box-sizing: border-box; }

.wv-schedule {
    width: 100%;
    max-width: 1240px;
    min-width: 0;
    container-type: inline-size;
    margin: 0 auto;
    padding: 12px 20px 60px;
    color: var(--wvs-text);
    font-family: Arial, Helvetica, sans-serif;
}

.wv-schedule__intro { margin: 0 0 26px; }
.wv-schedule__eyebrow {
    margin: 0 0 7px;
    color: var(--wvs-accent);
    font-size: 12px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.wv-schedule__lead {
    max-width: 820px;
    margin: 0;
    color: var(--wvs-muted);
    font-size: 17px;
    line-height: 1.55;
}

.wv-schedule__layout {
    display: grid;
    grid-template-columns: minmax(0, .94fr) minmax(430px, 1.06fr);
    gap: 28px;
    align-items: start;
}

.wv-schedule__panel,
.wv-schedule__preview-wrap {
    min-width: 0;
    border: 1px solid var(--wvs-line);
    border-radius: var(--wvs-radius);
    background: var(--wvs-card);
    box-shadow: 0 14px 40px rgba(23,32,51,.06);
}
.wv-schedule__panel { padding: 22px; }
.wv-schedule__preview-wrap {
    position: sticky;
    top: 22px;
    padding: 18px;
}

.wv-schedule-field { margin-bottom: 18px; }
.wv-schedule-field label,
.wv-schedule-choice legend {
    display: block;
    margin: 0 0 8px;
    color: #344054;
    font-size: 13px;
    line-height: 1.3;
    font-weight: 700;
}
.wv-schedule-field input,
.wv-schedule-field textarea,
.wv-schedule-item input {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 12px 13px;
    border: 1px solid #d9dee8;
    border-radius: 12px;
    outline: none;
    color: var(--wvs-text);
    background: #fff;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 15px !important;
    font-weight: 400 !important;
    line-height: 1.4 !important;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.wv-schedule-field textarea { min-height: 88px; resize: vertical; }
.wv-schedule-field input:focus,
.wv-schedule-field textarea:focus,
.wv-schedule-item input:focus {
    border-color: rgba(52,104,245,.72);
    box-shadow: 0 0 0 3px rgba(52,104,245,.11);
}

.wv-schedule-items-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 2px 0 10px;
}
.wv-schedule-items-head strong {
    display: block;
    font-size: 17px;
    line-height: 1.2;
}
.wv-schedule-items-head small {
    display: block;
    margin-top: 4px;
    color: var(--wvs-muted);
    font-size: 12px;
}
.wv-schedule__add {
    flex: 0 0 auto;
    min-height: 40px;
    padding: 9px 13px;
    border: 0;
    border-radius: 11px;
    color: #244fc3;
    background: #edf2ff;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    cursor: pointer;
}
.wv-schedule__add:hover { background: #e3eaff; }

.wv-schedule-items {
    display: grid;
    gap: 8px;
    margin-bottom: 18px;
}
.wv-schedule-item {
    display: grid;
    grid-template-columns: minmax(88px,.72fr) minmax(120px,.9fr) minmax(82px,.55fr) minmax(120px,1.15fr) 38px;
    gap: 8px;
    align-items: center;
}
.wv-schedule-item__remove {
    display: inline-flex;
    width: 38px;
    height: 42px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid #d9dee8;
    border-radius: 11px;
    color: #98a2b3;
    background: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}
.wv-schedule-item__remove:hover { color: #b5473d; border-color: #efc1bb; background: #fff7f5; }

.wv-schedule-choice {
    min-width: 0;
    margin: 0 0 18px;
    padding: 0;
    border: 0;
}
.wv-schedule-choice__grid { display: grid; gap: 8px; }
.wv-schedule-choice__grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.wv-schedule-choice__grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.wv-schedule-choice label { min-width: 0; cursor: pointer; }
.wv-schedule-choice input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}
.wv-schedule-choice span {
    display: flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    padding: 8px 10px;
    border: 1px solid #d9dee8;
    border-radius: 11px;
    color: #475467;
    background: #fff;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.wv-schedule-choice input:checked + span {
    border-color: var(--wvs-accent);
    color: #244fc3;
    background: #edf2ff;
    box-shadow: inset 0 0 0 1px var(--wvs-accent);
}

.wv-schedule__panel-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 2px;
}
.wv-schedule__reset {
    padding: 5px 0;
    border: 0;
    color: var(--wvs-muted);
    background: transparent;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
    font-size: 13px;
}

.wv-schedule__preview-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}
.wv-schedule__preview-head > div { min-width: 0; }
.wv-schedule__preview-head span {
    display: block;
    color: var(--wvs-text);
    font-size: 18px;
    line-height: 1.2;
    font-weight: 800;
}
.wv-schedule__preview-head small {
    display: block;
    margin-top: 4px;
    color: var(--wvs-muted);
    font-size: 13px;
}

.wv-schedule__preview {
    display: grid;
    place-items: center;
    width: 100%;
    min-height: 320px;
    padding: 12px;
    overflow: hidden;
    border-radius: 14px;
    background-color: #eef0f3;
    background-image:
        linear-gradient(45deg, #fff 25%, transparent 25%),
        linear-gradient(-45deg, #fff 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #fff 75%),
        linear-gradient(-45deg, transparent 75%, #fff 75%);
    background-size: 24px 24px;
    background-position: 0 0, 0 12px, 12px -12px, -12px 0;
}
.wv-schedule__preview svg {
    display: block;
    width: 100%;
    height: auto;
    max-height: 650px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(23,32,51,.10);
}

.wv-schedule__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}
.wv-schedule-btn {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border: 1px solid #d9dee8;
    border-radius: 11px;
    color: #344054;
    background: #fff;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    cursor: pointer;
}
.wv-schedule-btn--primary {
    border-color: var(--wvs-accent);
    color: #fff;
    background: var(--wvs-accent);
}
.wv-schedule-btn--primary:hover { background: var(--wvs-accent-dark); }
.wv-schedule-btn--download-main { grid-column: 1 / -1; }
.wv-schedule__privacy {
    margin: 11px 0 0;
    color: var(--wvs-muted);
    font-size: 12px;
    line-height: 1.45;
}
.wv-schedule__preview-head [data-wv-schedule-scroll-edit] { display: none; }

@container (max-width: 940px) {
    .wv-schedule__layout { grid-template-columns: 1fr; }
    .wv-schedule__preview-wrap { position: static; }
    .wv-schedule__preview-head [data-wv-schedule-scroll-edit] { display: inline-flex; }
    .wv-schedule__preview svg { max-height: none; }
}

@container (max-width: 680px) {
    .wv-schedule-item {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 38px;
    }
    .wv-schedule-item [data-wv-schedule-day] { grid-column: 1; grid-row: 1; }
    .wv-schedule-item [data-wv-schedule-date] { grid-column: 2; grid-row: 1; }
    .wv-schedule-item [data-wv-schedule-time] { grid-column: 1; grid-row: 2; }
    .wv-schedule-item [data-wv-schedule-event] { grid-column: 2; grid-row: 2; }
    .wv-schedule-item__remove { grid-column: 3; grid-row: 1 / 3; height: 100%; min-height: 42px; }
}

@container (max-width: 580px) {
    .wv-schedule { padding-left: 0; padding-right: 0; }
    .wv-schedule__lead { font-size: 15px; }
    .wv-schedule__panel,
    .wv-schedule__preview-wrap { border-radius: 16px; }
    .wv-schedule__panel { padding: 16px; }
    .wv-schedule__preview-wrap { padding: 14px; }
    .wv-schedule-items-head { align-items: flex-end; }
    .wv-schedule__add { max-width: 150px; }
    .wv-schedule-choice__grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Быстрые действия: пустая форма загружается по умолчанию. */
.wv-schedule__quick-actions { display:flex; justify-content:flex-end; gap:10px; flex-wrap:wrap; margin:0 0 18px; }
.wv-schedule__example, .wv-schedule__reset-top { min-height:40px; padding:9px 16px; border-radius:10px; font-weight:700; font-size:13px; cursor:pointer; }
.wv-schedule__example { border:1px solid var(--wvs-accent); background:var(--wvs-accent); color:#fff; }
.wv-schedule__reset-top { border:1px solid var(--wvs-accent); background:#fff; color:var(--wvs-accent-dark); }
.wv-schedule__example:hover { background:var(--wvs-accent-dark); }
.wv-schedule__reset-top:hover { background:#eef3ff; }
.wv-schedule__reset { color:var(--wvs-accent-dark); }
@media (max-width:560px) { .wv-schedule__quick-actions > button { flex:1 1 calc(50% - 5px); } }


.wv-schedule-field .wv-schedule-char-count{display:block;margin-top:6px;color:var(--wv-muted);font-size:12px;text-align:right;}

.wv-schedule__form-error{margin:0 0 16px;padding:10px 12px;border:1px solid #efc1bb;border-radius:10px;background:#fff7f5;color:#a23a31;font-size:13px;line-height:1.4;}
.wv-schedule__form-error[hidden]{display:none!important;}
.wv-schedule input.is-invalid,.wv-schedule textarea.is-invalid{border-color:#d94c40!important;box-shadow:0 0 0 3px rgba(217,76,64,.10)!important;}

/* 0.3.0 — единая система ВебВиро */
.wv-schedule{
    background:#f7f8fa;
    box-shadow:0 0 0 100vmax #f7f8fa;
    clip-path:inset(0 -100vmax);
}
body:has(.wv-schedule),
body:has(.wv-schedule) .wv-main,
body:has(.wv-schedule) .wv-shell,
body:has(.wv-schedule) .wv-main article,
body:has(.wv-schedule) .wv-entry{background:#f7f8fa !important;}
body:has(.wv-schedule) .wv-footer{background:#fffaf3 !important;border-top-color:#deded8;}
body:has(.wv-schedule) .wv-main{box-shadow:0 0 0 100vmax #f7f8fa;clip-path:inset(0 -100vmax);}

.wv-schedule__preview svg{border-radius:0 !important;}
.wv-schedule-add-row{display:flex;justify-content:flex-end;margin:-8px 0 18px;}
.wv-schedule__add{display:block;margin-left:auto;}

/* Карточки дизайнов */
.wv-schedule-design-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;}
.wv-schedule-design-grid[data-count="1"]{grid-template-columns:minmax(0,260px);}
.wv-schedule-design-grid[data-count="2"]{grid-template-columns:repeat(2,minmax(0,1fr));}
.wv-schedule-design-grid[data-count="3"]{grid-template-columns:repeat(3,minmax(0,1fr));}
.wv-schedule-design-card{display:block;min-width:0;cursor:pointer;}
.wv-schedule-design-card[hidden]{display:none !important;}
.wv-schedule-design-card>input,.wv-schedule-palette-card>input{position:absolute !important;opacity:0 !important;pointer-events:none !important;}
.wv-schedule-choice .wv-schedule-design-card__body{
    display:flex !important;min-height:148px !important;padding:10px !important;
    flex-direction:column !important;align-items:center !important;justify-content:flex-start !important;gap:7px !important;
    border:1px solid #d9dee8 !important;border-radius:13px !important;background:#fff !important;color:#344054 !important;
    box-shadow:none !important;text-align:center !important;
}
.wv-schedule-choice .wv-schedule-design-card__body strong{font-size:14px;line-height:1.2;color:#344054;}
.wv-schedule-choice .wv-schedule-design-card__body small{font-size:12px;line-height:1.35;color:#667085;}
.wv-schedule-choice .wv-schedule-design-card>input:checked+.wv-schedule-design-card__body{border-color:#3468f5 !important;background:#f5f8ff !important;box-shadow:inset 0 0 0 1px #3468f5 !important;}
.wv-schedule-choice .wv-schedule-design-thumb{
    position:relative !important;display:flex !important;width:100% !important;height:58px !important;min-height:58px !important;
    padding:0 !important;align-items:center !important;justify-content:center !important;overflow:visible !important;
    border:0 !important;border-radius:0 !important;background:transparent !important;box-shadow:none !important;
}
.wv-schedule-choice .wv-schedule-design-thumb::before,.wv-schedule-choice .wv-schedule-design-thumb::after{box-sizing:border-box;}
/* Рамка */
.wv-schedule[data-wv-schedule-design-style="strict"] .wv-schedule-design-thumb--1::before{content:"";display:block;width:36px;height:36px;border:2px solid #667085;border-radius:0;background:transparent;}
/* Воздух */
.wv-schedule[data-wv-schedule-design-style="minimal"] .wv-schedule-design-thumb--1::before{content:"";display:block;width:2px;height:42px;background:#cfd6e2;}
/* Карточки */
.wv-schedule[data-wv-schedule-design-style="minimal"] .wv-schedule-design-thumb--2::before,
.wv-schedule[data-wv-schedule-design-style="minimal"] .wv-schedule-design-thumb--2::after{content:"";position:absolute;left:50%;width:38px;height:12px;border:1.5px solid #667085;border-radius:0;background:transparent;transform:translateX(-50%);}
.wv-schedule[data-wv-schedule-design-style="minimal"] .wv-schedule-design-thumb--2::before{top:13px;}
.wv-schedule[data-wv-schedule-design-style="minimal"] .wv-schedule-design-thumb--2::after{top:32px;}
/* Типографика */
.wv-schedule[data-wv-schedule-design-style="minimal"] .wv-schedule-design-thumb--3::before{content:"АБВ";display:block;color:#667085;font:700 23px/1 Arial,Helvetica,sans-serif;letter-spacing:.08em;}
/* Темный */
.wv-schedule[data-wv-schedule-design-style="contrast"] .wv-schedule-design-thumb--1::before{content:"";display:block;width:36px;height:36px;background:#202736;border-radius:0;}
/* Таблица — как в Прайсе */
.wv-schedule[data-wv-schedule-design-style="business"] .wv-schedule-design-thumb--1::before{
    content:"";display:block;width:44px;height:34px;border:1.5px solid #667085;border-radius:0;
    background:
      linear-gradient(#667085,#667085) 0 10px/100% 1px no-repeat,
      linear-gradient(#667085,#667085) 0 21px/100% 1px no-repeat,
      linear-gradient(#667085,#667085) 14px 0/1px 100% no-repeat,
      linear-gradient(#667085,#667085) 29px 0/1px 100% no-repeat,
      transparent;
}

/* Палитры */
.wv-schedule-palette-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;}
.wv-schedule-palette-card{display:block;min-width:0;cursor:pointer;}
.wv-schedule-choice .wv-schedule-palette-card__body{
    display:flex;min-height:78px;padding:10px;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:8px;
    border:1px solid #d9dee8;border-radius:13px;background:#fff;color:#344054;box-shadow:none;
}
.wv-schedule-choice .wv-schedule-palette-card__body strong{font-size:12px;line-height:1.2;color:#344054;}
.wv-schedule-choice .wv-schedule-palette-card>input:checked+.wv-schedule-palette-card__body{border-color:#3468f5;background:#f5f8ff;box-shadow:inset 0 0 0 1px #3468f5;}
.wv-schedule-choice .wv-schedule-palette-swatches{display:flex;min-height:0;padding:0;align-items:center;justify-content:center;gap:5px;border:0;border-radius:0;background:transparent;box-shadow:none;}
.wv-schedule-choice .wv-schedule-palette-swatches i{display:block;width:18px;height:18px;border-radius:0;background:var(--sw);border:1px solid rgba(23,32,51,.10);}

@container (max-width:560px){
    .wv-schedule-design-grid,.wv-schedule-palette-grid{grid-template-columns:1fr;}
    .wv-schedule-choice .wv-schedule-design-card__body{min-height:118px !important;}
    .wv-schedule-choice .wv-schedule-design-thumb{height:48px !important;min-height:48px !important;}
}


/* 0.3.1 — форма как в остальных сервисах, дата -> день -> время -> событие */
:root{--wvs-card:#ffffff;--wvs-bg:#f7f8fa;}
.wv-schedule__panel,.wv-schedule__preview-wrap{background:#fff;}
.wv-schedule-item{grid-template-columns:22% 19% 21% minmax(0,1fr) 38px;gap:8px;align-items:center;}
.wv-schedule-item>*{min-width:0;}
.wv-schedule-item [data-wv-schedule-event]{min-width:0;width:100% !important;max-width:100% !important;}
.wv-schedule-item [data-wv-schedule-day]{background:#f7f8fa;color:#475467;cursor:default;}
.wv-schedule-item [data-wv-schedule-day]:focus{border-color:#d9dee8;box-shadow:none;}
@container (max-width:680px){
    .wv-schedule-item{grid-template-columns:minmax(0,1fr) minmax(0,1fr) 38px;}
    .wv-schedule-item [data-wv-schedule-date]{grid-column:1;grid-row:1;}
    .wv-schedule-item [data-wv-schedule-day]{grid-column:2;grid-row:1;}
    .wv-schedule-item [data-wv-schedule-time]{grid-column:1;grid-row:2;}
    .wv-schedule-item [data-wv-schedule-event]{grid-column:2;grid-row:2;}
    .wv-schedule-item__remove{grid-column:3;grid-row:1 / 3;height:100%;min-height:42px;}
}


/* 0.3.4 — дата без обрезания года и наложения календаря */
.wv-schedule-item [data-wv-schedule-date]{
    padding-left:10px !important;
    padding-right:6px !important;
    font-size:14px !important;
}
.wv-schedule-item [data-wv-schedule-date]::-webkit-calendar-picker-indicator{
    width:18px;
    height:18px;
    margin-left:4px;
    padding:0;
    flex:0 0 18px;
}
