/* WKAU_PALETTE: widget.css көшірмесі — автоматты жасалады, қолмен өзгертпеңіз */
/* WKAU Celebrations v3 — frontend widget & shortcode */

.wkau-celebrations {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 4px 0;
}

.wkau-sc-title {
    font-size: 1.1em;
    margin: 0 0 12px;
    color: #0b2f63;
}


.wkau-no-events {
    color: #64748b;
    font-style: italic;
    font-size: 0.85em;
    padding: 6px 0;
    margin: 0;
}

/* ── Base Card — Compact Timeline ────────────────── */
.wkau-card {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 0 0 12px 0;
    background: none;
    border: none;
    box-shadow: none;
    transition: opacity 0.15s ease;
    position: relative;
}

/* Соединительная линия */
.wkau-card::after {
    content: '';
    position: absolute;
    left: 13px;
    top: 30px;
    bottom: 0;
    width: 1.5px;
    background: linear-gradient(to bottom, #dbe7f6 50%, transparent);
    z-index: 0;
}

.wkau-card:last-child::after { display: none; }
.wkau-card:hover { opacity: 0.88; }

/* Цвета узлов по типу */
.wkau-card.wkau-type-birthday .wkau-card-icon {
    background: #0052a5;
    border-color: #3b82c4;
    box-shadow: 0 0 0 3px rgba(59, 130, 196,0.12);
}
.wkau-card.wkau-type-holiday.wkau-htype-state .wkau-card-icon {
    background: #0052a5;
    border-color: #003b78;
    box-shadow: 0 0 0 3px rgba(0, 82, 165,0.12);
}
.wkau-card.wkau-type-holiday.wkau-htype-corporate .wkau-card-icon {
    background: #0052a5;
    border-color: #0052a5;
    box-shadow: 0 0 0 3px rgba(0, 82, 165,0.12);
}

/* Today — более яркий */
.wkau-card.wkau-today.wkau-type-birthday .wkau-card-icon {
    background: #0052a5;
    border-color: #fff;
    box-shadow: 0 0 0 3px rgba(59, 130, 196,0.20);
}
.wkau-card.wkau-today.wkau-htype-state .wkau-card-icon {
    background: #0052a5;
    border-color: #fff;
    box-shadow: 0 0 0 3px rgba(0, 82, 165,0.20);
}
.wkau-card.wkau-today.wkau-htype-corporate .wkau-card-icon {
    background: #0052a5;
    border-color: #fff;
    box-shadow: 0 0 0 3px rgba(0, 82, 165,0.20);
}

/* Пульс — на иконке */
@keyframes wkau-pulse-pink { 0%,100%{box-shadow:0 0 0 3px rgba(59, 130, 196,.12),0 0 0 0 rgba(59, 130, 196,.25)} 55%{box-shadow:0 0 0 3px rgba(59, 130, 196,.12),0 0 0 7px rgba(59, 130, 196,0)} }
@keyframes wkau-pulse-blue { 0%,100%{box-shadow:0 0 0 3px rgba(0, 82, 165,.12),0 0 0 0 rgba(0, 82, 165,.25)} 55%{box-shadow:0 0 0 3px rgba(0, 82, 165,.12),0 0 0 7px rgba(0, 82, 165,0)} }
@keyframes wkau-pulse-gold { 0%,100%{box-shadow:0 0 0 3px rgba(0, 82, 165,.12),0 0 0 0 rgba(0, 82, 165,.25)} 55%{box-shadow:0 0 0 3px rgba(0, 82, 165,.12),0 0 0 7px rgba(0, 82, 165,0)} }

.wkau-card.wkau-today.wkau-type-birthday .wkau-card-icon   { animation: wkau-pulse-pink 2.4s ease-in-out infinite; }
.wkau-card.wkau-today.wkau-htype-state .wkau-card-icon     { animation: wkau-pulse-blue 2.4s ease-in-out infinite; }
.wkau-card.wkau-today.wkau-htype-corporate .wkau-card-icon { animation: wkau-pulse-gold 2.4s ease-in-out infinite; }

/* ── Group Card ─────────────────────────────────── */
.wkau-card.wkau-card-group {
    flex-direction: row;
    border: none;
    background: none;
    box-shadow: none;
    padding: 0 0 12px 0;
}

.wkau-card.wkau-card-group > .wkau-card-icon {
    font-size: 1.2em;
    margin-bottom: 0;
}

.wkau-card.wkau-card-group .wkau-card-body {
    width: auto;
}

.wkau-card.wkau-card-group .wkau-badge {
    position: static;
    top: auto;
    right: auto;
    align-self: flex-start;
    margin-top: 4px;
}

/* Group header */
.wkau-group-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9em;
    color: #880040;
    margin-bottom: 6px;
}

.wkau-group-count {
    background: #e74c8b;
    color: #fff;
    font-size: 0.72em;
    font-weight: 800;
    padding: 1px 7px;
    border-radius: 12px;
}

/* People list inside group card */
.wkau-group-people {
    list-style: none;
    margin: 0 0 8px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.wkau-group-people li {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 1px;
    font-size: 0.85em;
    padding: 3px 0;
    border-bottom: 1px dashed rgba(0,0,0,0.07);
}

.wkau-group-people li:last-child { border-bottom: none; }

.wkau-group-people li::before {
    content: none !important;
}

.wkau-group-person-name {
    display: block !important;
    width: 100% !important;
    font-weight: 700;
    color: #0052a5;
    text-align: left !important;
    float: none !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
}

.wkau-group-person-dept {
    display: block !important;
    font-size: 0.88em;
    color: #3b82c4;
    font-style: italic;
}

/* ── Card inner elements ─────────────────────────── */
.wkau-card-icon {
    font-size: 1em;
    line-height: 1;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    min-width: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #0052a5;
    border: 2px solid #003b78;
    box-shadow: 0 0 0 3px rgba(0, 82, 165,0.12);
    position: relative;
    z-index: 1;
    text-shadow: 0 0 4px rgba(255,255,255,0.9), 0 1px 3px rgba(255,255,255,0.6);
}

.wkau-card-body {
    flex: 1;
    min-width: 0;
    background: #eef5ff;
    border-radius: 10px;
    padding: 7px 10px;
    box-shadow: 0 1px 4px rgba(0, 82, 165,0.07);
}

/* Type-specific body tints */
.wkau-type-birthday .wkau-card-body          { background: #eef5ff; }
.wkau-htype-state .wkau-card-body            { background: #eef5ff; }
.wkau-htype-corporate .wkau-card-body        { background: #eef5ff; }
.wkau-today .wkau-card-body                  { box-shadow: 0 2px 10px rgba(0, 82, 165,0.14); }

.wkau-card-name {
    display: block !important;
    width: 100% !important;
    font-weight: 700;
    font-size: 0.84em;
    color: #0052a5;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left !important;
    float: none !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
}

.wkau-card-sub {
    font-size: 0.58em;
    color: #3b82c4;
    margin-top: 1px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Greeting lines */
.wkau-card-greet {
    display: flex;
    flex-direction: column;
    gap: 1px;
    margin-top: 3px;
}

/* Single language greeting (frontend) */
.wkau-greet-single {
    display: block;
    width: 100%;
    font-size: 0.75em;
    color: #0b2f63;
    font-style: italic;
    line-height: 1.4;
}

/* Three-language lines (admin) */
.wkau-lang {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.73em;
    color: #0b2f63;
    line-height: 1.35;
}

.wkau-lang.wkau-lang-ru { font-weight: 600; }

.wkau-flag {
    font-size: 0.92em;
    flex-shrink: 0;
    line-height: 1;
}

/* Holiday names in admin (shown below greeting) */
.wkau-card-names {
    margin-top: 3px;
    padding-top: 3px;
    border-top: 1px dashed rgba(0, 82, 165,0.12);
}

.wkau-card-date {
    font-size: 0.67em;
    font-weight: 600;
    color: #64748b;
    margin-top: 4px;
    letter-spacing: 0.02em;
}

/* ── Badge ────────────────────────────────────────── */
.wkau-badge {
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: 2px;
    font-size: 0.64em;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 20px;
    white-space: nowrap;
    letter-spacing: 0.02em;
}

.wkau-badge-today    { background: #0052a5; color: #fff; }
.wkau-badge-soon     { background: #0052a5; color: #fff; }
.wkau-badge-upcoming { background: rgba(59, 130, 196,0.12); color: #3b82c4; }

.wkau-htype-state     .wkau-badge-today { background: #0052a5; }
.wkau-htype-corporate .wkau-badge-today { background: #0052a5; }

/* ═══════════════════════════════════════════════════════════
   SHORTCODE — "Festival Poster" style
   Completely overrides widget card look inside shortcode context
   ═══════════════════════════════════════════════════════════ */

.wkau-celebrations-shortcode {
    max-width: 320px;
}

/* Title banner */
.wkau-celebrations-shortcode .wkau-sc-title {
    background: linear-gradient(135deg, #0a1628 0%, #0052a5 55%, #e0a526 100%);
    color: #fff;
    padding: 7px 12px;
    border-radius: 9px;
    font-size: 0.78em;
    font-weight: 800;
    margin: 0 0 7px;
    letter-spacing: -0.01em;
    text-shadow: 0 1px 3px rgba(0,0,0,0.25);
}

.wkau-celebrations-shortcode .wkau-celebrations {
    gap: 6px;
}

/* Card: 2-column grid — gradient strip | content */
.wkau-celebrations-shortcode .wkau-card {
    display: grid;
    grid-template-columns: 40px 1fr;
    align-items: stretch;
    min-height: 54px;
    padding: 0;
    border-left: none;
    border-radius: 9px;
    overflow: hidden;
    background: #fff !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.09);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
    animation: none !important;
    position: relative;
}

.wkau-celebrations-shortcode .wkau-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

.wkau-celebrations-shortcode .wkau-card.wkau-today {
    box-shadow: 0 8px 36px rgba(0,0,0,0.18);
}

/* Icon column: full-height gradient strip */
.wkau-celebrations-shortcode .wkau-card-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.4em;
    line-height: 1;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    height: 100% !important;
    min-width: unset !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
    position: relative;
    isolation: isolate;
    background: linear-gradient(160deg, #3b82c4 0%, #0052a5 100%) !important;
}

/* Белый круг-подложка под эмодзи */
.wkau-celebrations-shortcode .wkau-card-icon::before {
    content: '';
    position: absolute;
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.85);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: -1;
}

/* Type-specific gradients — тема */
.wkau-celebrations-shortcode .wkau-type-birthday .wkau-card-icon {
    background: linear-gradient(160deg, #3b82c4 0%, #3b82c4 100%) !important;
}
.wkau-celebrations-shortcode .wkau-type-holiday.wkau-htype-state .wkau-card-icon {
    background: linear-gradient(160deg, #3b82c4 0%, #0052a5 100%) !important;
}
.wkau-celebrations-shortcode .wkau-type-holiday.wkau-htype-corporate .wkau-card-icon {
    background: linear-gradient(160deg, #3b82c4 0%, #0052a5 100%) !important;
}

/* Today — насыщеннее, темнее */
.wkau-celebrations-shortcode .wkau-today.wkau-type-birthday .wkau-card-icon {
    background: linear-gradient(160deg, #3b82c4 0%, #0052a5 100%) !important;
}
.wkau-celebrations-shortcode .wkau-today.wkau-htype-state .wkau-card-icon {
    background: linear-gradient(160deg, #0052a5 0%, #003b78 100%) !important;
}
.wkau-celebrations-shortcode .wkau-today.wkau-htype-corporate .wkau-card-icon {
    background: linear-gradient(160deg, #0052a5 0%, #003b78 100%) !important;
}

/* Card body */
.wkau-celebrations-shortcode .wkau-card-body {
    padding: 7px 50px 6px 10px; /* right padding leaves room for badge */
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0;
}

/* Badge: floating top-right pill */
.wkau-celebrations-shortcode .wkau-card .wkau-badge {
    position: absolute;
    top: 7px;
    right: 8px;
    margin: 0;
    font-size: 0.50em;
    padding: 2px 6px;
}

/* Name: wraps freely */
.wkau-celebrations-shortcode .wkau-card-name {
    font-size: 0.72em;
    font-weight: 800;
    color: #0a1628;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    line-height: 1.25;
}

/* Greeting: visually separated */
.wkau-celebrations-shortcode .wkau-card-greet {
    margin-top: 3px;
    padding-top: 3px;
    border-top: 1px solid rgba(0,0,0,0.07);
    gap: 0;
}

.wkau-celebrations-shortcode .wkau-greet-single {
    display: block;
    width: calc(100% + 40px);
    font-size: 0.63em;
    color: #334155;
    font-style: italic;
    line-height: 1.38;
}

/* Date: subtle caption */
.wkau-celebrations-shortcode .wkau-card-date {
    font-size: 0.57em;
    font-weight: 600;
    color: #bbb;
    margin-top: 3px;
    letter-spacing: 0.02em;
}

/* Group card */
.wkau-celebrations-shortcode .wkau-card.wkau-card-group {
    min-height: 0;
    overflow: visible;
    border-radius: 9px;
}

.wkau-celebrations-shortcode .wkau-card.wkau-card-group > .wkau-card-icon {
    font-size: 1.15em;
    margin-bottom: 0;
    border-radius: 9px 0 0 9px !important;
}

/* Возвращаем абсолютный бейдж — переопределяем static из базового стиля */
.wkau-celebrations-shortcode .wkau-card.wkau-card-group .wkau-badge {
    position: absolute !important;
    top: 7px !important;
    right: 8px !important;
    align-self: auto;
    margin-top: 0;
}

.wkau-celebrations-shortcode .wkau-group-label {
    font-size: 0.68em;
    margin-bottom: 3px;
}

.wkau-celebrations-shortcode .wkau-group-people {
    margin: 0 0 4px 0 !important;
    padding: 0 !important;
}

.wkau-celebrations-shortcode .wkau-group-people li {
    font-size: 1em;
    padding: 2px 0 !important;
    margin: 0 !important;
    text-indent: 0 !important;
    align-items: flex-start !important;
}

/* Имена в группе = тот же стиль что .wkau-card-name в шорткоде */
.wkau-celebrations-shortcode .wkau-group-person-name {
    display: block !important;
    width: 100% !important;
    font-size: 0.72em;
    font-weight: 800;
    color: #0a1628;
    white-space: normal;
    line-height: 1.25;
    text-align: left !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
    text-indent: 0 !important;
}

.wkau-celebrations-shortcode .wkau-group-person-dept {
    font-size: 0.58em;
    color: #3b82c4;
    font-style: italic;
    margin: 0 !important;
    padding: 0 !important;
    text-indent: 0 !important;
}

@media (max-width: 768px) {
    .wkau-card-sub { margin-top: 4px; }
}

/* Responsive */
@media (max-width: 340px) {
    .wkau-celebrations-shortcode .wkau-card {
        grid-template-columns: 34px 1fr;
    }
    .wkau-celebrations-shortcode .wkau-card-icon { font-size: 0.95em; }
    .wkau-celebrations-shortcode .wkau-card-name { font-size: 0.66em; }
    .wkau-celebrations-shortcode .wkau-card-body { padding: 6px 44px 5px 9px; }
    .wkau-celebrations-shortcode .wkau-sc-title  { font-size: 0.72em; padding: 6px 10px; }
}

/* ── Shortcode: сброс timeline-специфичных стилей ── */
.wkau-celebrations-shortcode .wkau-card::after { display: none; }
.wkau-celebrations-shortcode .wkau-card-body   { background: none !important; border-radius: 0 !important; padding: 7px 50px 6px 10px !important; box-shadow: none !important; }

/* ── Dashboard widget tweaks ──────────────────────── */
.wkau-dash .wkau-card        { padding: 9px 11px !important; background: #f8fafc !important; border-radius: 12px !important; box-shadow: 0 1px 6px rgba(0,0,0,0.07) !important; }
.wkau-dash .wkau-card::after { display: none !important; }
.wkau-dash .wkau-card-icon   { background: rgba(255,255,255,0.8) !important; border: none !important; box-shadow: none !important; }
.wkau-dash .wkau-card-body   { background: none !important; border-radius: 0 !important; padding: 0 !important; box-shadow: none !important; }
.wkau-dash .wkau-card-name   { font-size: 0.86em; }
.wkau-dash .wkau-lang        { font-size: 0.72em; }
.wkau-dash .wkau-greet-single{ font-size: 0.77em; }
.wkau-dash-upcoming .wkau-card { opacity: 0.87; }
