/* ==========================================================================
   SKYSTONE WIDGET - EVENTOS V13
   Coluna lateral oficial: 220px.
   O contador/estado continua sendo controlado pelo core.
   ========================================================================== */

body.template-skystone
.site-schedule-widget[data-widget="events"] {
    width: 100%;
    margin: 10px 0 0;
    padding: 0;

    border: 1px solid #d4e6ea;

    background:
        url("../../images/fon-bg-account-top.png")
        center top / 100% auto no-repeat,
        url("../../images/fon-bg-account-bottom.png")
        center bottom / 100% auto no-repeat,
        rgba(255,255,255,.97);
}

body.template-skystone
.site-schedule-widget[data-widget="events"]
.site-schedule-head {
    min-height: 42px;

    margin: 0;
    padding: 12px 12px 8px;

    display: flex;
    align-items: center;

    border-bottom: 1px solid #dcebed;
    background: rgba(249,252,253,.72);
}

body.template-skystone
.site-schedule-widget[data-widget="events"]
.site-schedule-head h3 {
    margin: 0;

    color: #075f78;

    font-family: Georgia, "Times New Roman", serif;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
}

body.template-skystone
.site-schedule-widget[data-widget="events"]
.site-schedule-list {
    padding: 3px 12px 8px;
}

body.template-skystone
.site-schedule-widget[data-widget="events"]
.site-schedule-item {
    min-height: 28px;

    margin: 0;
    padding: 5px 0;

    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
    align-items: center;

    border-bottom: 1px solid #e2edef;

    background: transparent;
}

body.template-skystone
.site-schedule-widget[data-widget="events"]
.site-schedule-item:last-child {
    border-bottom: 0;
}

body.template-skystone
.site-schedule-widget[data-widget="events"]
.site-schedule-info {
    min-width: 0;
}

body.template-skystone
.site-schedule-widget[data-widget="events"]
.site-schedule-info strong {
    display: block;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    color: #075f78;

    font-size: 7.5px;
    font-weight: 700;
    line-height: 1.1;
}

body.template-skystone
.site-schedule-widget[data-widget="events"]
.site-schedule-info small {
    display: block;

    margin-top: 2px;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    color: #789ba7;

    font-size: 6px;
    font-weight: 400;
    line-height: 1;
}

body.template-skystone
.site-schedule-widget[data-widget="events"]
.site-schedule-state {
    min-width: 69px;

    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;

    white-space: nowrap;
}

body.template-skystone
.site-schedule-widget[data-widget="events"]
.site-schedule-dot {
    width: 6px;
    height: 6px;

    flex: 0 0 6px;

    border-radius: 50%;

    background: #ef5962;

    box-shadow: 0 0 0 3px rgba(239,89,98,.10);
}

body.template-skystone
.site-schedule-widget[data-widget="events"]
.site-schedule-count {
    color: #3f7182;

    font-size: 6.5px;
    font-weight: 500;
    line-height: 1;

    text-align: right;
}

/* O core aplica classes/estado durante o contador.
   Cobre os nomes mais comuns sem alterar a lógica. */
body.template-skystone
.site-schedule-widget[data-widget="events"]
.site-schedule-item.is-active
.site-schedule-dot,
body.template-skystone
.site-schedule-widget[data-widget="events"]
.site-schedule-item.active
.site-schedule-dot,
body.template-skystone
.site-schedule-widget[data-widget="events"]
.site-schedule-item[data-running="1"]
.site-schedule-dot {
    background: #2cc783;
    box-shadow: 0 0 0 3px rgba(44,199,131,.11);
}

body.template-skystone
.site-schedule-widget[data-widget="events"]
.site-schedule-item.is-active
.site-schedule-count,
body.template-skystone
.site-schedule-widget[data-widget="events"]
.site-schedule-item.active
.site-schedule-count,
body.template-skystone
.site-schedule-widget[data-widget="events"]
.site-schedule-item[data-running="1"]
.site-schedule-count {
    color: #168e62;
    font-weight: 700;
}


/* ==========================================================================
   V13.1 - ESTADO EM ANDAMENTO
   O core aplica .online diretamente em .site-schedule-dot.
   ========================================================================== */

body.template-skystone
.site-schedule-widget
.site-schedule-dot.online {
    order: 2;

    background: #24c77d !important;

    box-shadow:
        0 0 0 3px rgba(36,199,125,.12) !important;
}

body.template-skystone
.site-schedule-widget
.site-schedule-dot.online
+
.site-schedule-count {
    order: 1;

    color: #159764 !important;

    font-weight: 700 !important;
}

/* Mantém o conjunto alinhado à direita no estado ativo. */
body.template-skystone
.site-schedule-widget
.site-schedule-state:has(.site-schedule-dot.online) {
    gap: 5px;
}

/* Se o navegador não suportar :has(), order já resolve a posição. */
