/* ============================================================
   MEETINGS — працює зі старим шаблоном (без кастомних класів)
   Головний namespace: .elementor-shortcode
   ============================================================ */

/* ---- Таблиця ---- */
.elementor-shortcode table {
    width: 100% !important;
    border-collapse: collapse !important;
    font-size: 14px !important;
    background: #fff !important;
    table-layout: auto !important;
    display: table !important;
}

/* Рядок-заголовок (th в tbody, бо немає thead) */
.elementor-shortcode table tr:first-child {
    background: #f2f5f9 !important;
    border-bottom: 2px solid #dce4ef !important;
}
.elementor-shortcode table tr:first-child th {
    padding: 11px 14px !important;
    text-align: left !important;
    font-weight: 700 !important;
    font-size: 11px !important;
    text-transform: uppercase !important;
    letter-spacing: .06em !important;
    color: #5a6a85 !important;
    white-space: nowrap !important;
    display: table-cell !important;
}

/* Рядки даних */
.elementor-shortcode table tr:not(:first-child) {
    border-bottom: 1px solid #edf0f5 !important;
    background: #ffffff !important;
    display: table-row !important;
}
.elementor-shortcode table tr:not(:first-child):nth-child(even) {
    background: #f5f7fb !important;
}
.elementor-shortcode table tr:not(:first-child):hover {
    background: #eef4ff !important;
}

/* Клітинки */
.elementor-shortcode table td {
    padding: 10px 14px !important;
    vertical-align: middle !important;
    color: #2d3748 !important;
    white-space: nowrap !important;
    display: table-cell !important;
    border-top: none !important;
}

/* User link */
.elementor-shortcode table td a {
    color: #0077cc !important;
    text-decoration: none !important;
    font-weight: 500 !important;
}
.elementor-shortcode table td a:hover {
    text-decoration: underline !important;
}

/* ---- Status badges ---- */
.elementor-shortcode .um-status {
    display: inline-block !important;
    padding: 3px 10px !important;
    border-radius: 20px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
}
.elementor-shortcode .um-status-accepted  { background: #e6f9f0 !important; color: #1a8c54 !important; }
.elementor-shortcode .um-status-pending   { background: #fff7e0 !important; color: #b07c00 !important; }
.elementor-shortcode .um-status-cancelled { background: #fdecea !important; color: #c0392b !important; }
.elementor-shortcode .um-status-rejected  { background: #f4f4f4 !important; color: #777    !important; }

/* ---- Кнопки — однакова висота ---- */
.elementor-shortcode .gcal-button,
.elementor-shortcode .cancel-meeting,
.elementor-shortcode .accept-meeting,
.elementor-shortcode .reject-meeting,
.elementor-shortcode .edit-meeting {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    height: 34px !important;
    min-height: 34px !important;
    padding: 0 14px !important;
    border-radius: 7px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    text-decoration: none !important;
    border: 1px solid transparent !important;
    box-sizing: border-box !important;
    font-family: inherit !important;
    margin: 0 2px 0 0 !important;
    width: auto !important;
    transition: opacity .15s, box-shadow .15s !important;
}
.elementor-shortcode .gcal-button:hover,
.elementor-shortcode .cancel-meeting:hover,
.elementor-shortcode .accept-meeting:hover,
.elementor-shortcode .reject-meeting:hover,
.elementor-shortcode .edit-meeting:hover {
    opacity: .85 !important;
    box-shadow: 0 2px 6px rgba(0,0,0,.13) !important;
}

.elementor-shortcode .gcal-button    { background: #e8f0fe !important; color: #1a73e8 !important; border-color: #c5d8fd !important; }
.elementor-shortcode .cancel-meeting { background: #fdecea !important; color: #c0392b !important; border-color: #f5b7b1 !important; }
.elementor-shortcode .accept-meeting { background: #e6f9f0 !important; color: #1a8c54 !important; border-color: #a3e6c5 !important; }
.elementor-shortcode .reject-meeting { background: #f4f4f4 !important; color: #555    !important; border-color: #ccc    !important; }
.elementor-shortcode .edit-meeting   { background: #fff8e1 !important; color: #b07c00 !important; border-color: #ffe082 !important; }

/* ---- Video call (Better Messages) ---- */
.elementor-shortcode .bm-video-call {
    display: inline-flex !important;
    align-items: center !important;
}
.elementor-shortcode .bm-video-call .um-bm-video-btn,
.elementor-shortcode .bm-video-call a,
.elementor-shortcode .bm-video-call button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
    padding: 0 14px !important;
    border-radius: 7px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    text-decoration: none !important;
    box-sizing: border-box !important;
    background: #e8f0ff !important;
    color: #1a5fcc !important;
    border: 1px solid #cfe0ff !important;
    margin: 0 !important;
    width: auto !important;
}
.elementor-shortcode .bm-video-call .um-bm-video-btn:hover,
.elementor-shortcode .bm-video-call a:hover,
.elementor-shortcode .bm-video-call button:hover {
    background: #dbe8ff !important;
    box-shadow: 0 2px 6px rgba(0,0,0,.12) !important;
}


/* ============================================================
   COMPACT / SIDEBAR — .meetings-compact на блоці Elementor
   Використовуємо .meetings-compact .elementor-shortcode
   для вищої специфічності над desktop-стилями
   ============================================================ */

/* Заголовок */
.meetings-compact .elementor-shortcode h1 {
    font-size: 1.1rem !important;
    margin-bottom: 14px !important;
    color: #1a1a2e !important;
}

/* Скидаємо table на block */
.meetings-compact .elementor-shortcode table {
    display: block !important;
    width: 100% !important;
    min-width: unset !important;
    background: transparent !important;
    border-collapse: separate !important;
}
.meetings-compact .elementor-shortcode table tbody {
    display: block !important;
    width: 100% !important;
}

/* Ховаємо header-рядок */
.meetings-compact .elementor-shortcode table tr:first-child {
    display: none !important;
}

/* Кожна зустріч = картка */
.meetings-compact .elementor-shortcode table tr {
    display: block !important;
    width: 100% !important;
    background: #ffffff !important;
    border: 1px solid #dce6f5 !important;
    border-radius: 10px !important;
    padding: 12px 14px !important;
    box-shadow: 0 2px 6px rgba(0,0,0,.07) !important;
    margin-bottom: 10px !important;
    box-sizing: border-box !important;
}
.meetings-compact .elementor-shortcode table tr:first-child {
    display: none !important;
}

/* Клітинки — рядок label + value */
.meetings-compact .elementor-shortcode table td {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 5px 0 !important;
    border-bottom: 1px solid #f0f4f8 !important;
    border-top: none !important;
    font-size: 13px !important;
    color: #2d3748 !important;
    white-space: normal !important;
    width: 100% !important;
    box-sizing: border-box !important;
}
.meetings-compact .elementor-shortcode table td:last-child {
    border-bottom: none !important;
    padding-top: 8px !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 6px !important;
}

/* Label зліва */
.meetings-compact .elementor-shortcode table td::before {
    content: attr(data-label) !important;
    display: inline-block !important;
    font-weight: 700 !important;
    font-size: 10px !important;
    text-transform: uppercase !important;
    letter-spacing: .06em !important;
    color: #9aabb8 !important;
    flex-shrink: 0 !important;
    margin-right: 8px !important;
    min-width: 60px !important;
}

/* Value вирівнюємо вправо */
.meetings-compact .elementor-shortcode table td > * {
    margin-left: auto !important;
}
.meetings-compact .elementor-shortcode table td > a {
    color: #0077cc !important;
    font-weight: 500 !important;
    text-decoration: none !important;
}

/* Status кольори через data-label */
.meetings-compact .elementor-shortcode table td[data-label="Status"] {
    font-weight: 600 !important;
}
.meetings-compact .elementor-shortcode .um-status-accepted  { color: #1a8c54 !important; background: #e6f9f0 !important; }
.meetings-compact .elementor-shortcode .um-status-cancelled { color: #c0392b !important; background: #fdecea !important; }
.meetings-compact .elementor-shortcode .um-status-pending   { color: #b07c00 !important; background: #fff7e0 !important; }
.meetings-compact .elementor-shortcode .um-status-rejected  { color: #777    !important; background: #f4f4f4 !important; }

/* Кнопки — повна ширина, стек */
/* Явно показуємо ВСІ кнопки (тема деякі ховала через display:none) */
.meetings-compact .elementor-shortcode table td[data-label="Actions"] .gcal-button,
.meetings-compact .elementor-shortcode table td[data-label="Actions"] .cancel-meeting,
.meetings-compact .elementor-shortcode table td[data-label="Actions"] .accept-meeting,
.meetings-compact .elementor-shortcode table td[data-label="Actions"] .reject-meeting,
.meetings-compact .elementor-shortcode table td[data-label="Actions"] .edit-meeting,
.meetings-compact .elementor-shortcode .gcal-button,
.meetings-compact .elementor-shortcode .cancel-meeting,
.meetings-compact .elementor-shortcode .accept-meeting,
.meetings-compact .elementor-shortcode .reject-meeting,
.meetings-compact .elementor-shortcode .edit-meeting {
    display: flex !important;
    width: 100% !important;
    height: 34px !important;
    margin: 0 0 5px 0 !important;
    justify-content: center !important;
}
.meetings-compact .elementor-shortcode .bm-video-call {
    width: 100% !important;
    display: block !important;
}
.meetings-compact .elementor-shortcode .bm-video-call .um-bm-video-btn,
.meetings-compact .elementor-shortcode .bm-video-call a,
.meetings-compact .elementor-shortcode .bm-video-call button {
    width: 100% !important;
    height: 34px !important;
    margin: 0 !important;
    display: flex !important;
}



/* ============================================================
   MOBILE (≤ 700px)
   ============================================================ */
@media (max-width: 700px) {

    .elementor-shortcode table {
        display: block !important;
        min-width: unset !important;
        overflow-x: visible !important;
    }
    .elementor-shortcode table tr:first-child {
        display: none !important;
    }
    .elementor-shortcode table tbody {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
    }
    .elementor-shortcode table tr:not(:first-child) {
        display: flex !important;
        flex-direction: column !important;
        background: #fff !important;
        border: 1px solid #e4e9f2 !important;
        border-radius: 12px !important;
        padding: 14px 16px !important;
        box-shadow: 0 1px 5px rgba(0,0,0,.07) !important;
    }
    .elementor-shortcode table td {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 7px 0 !important;
        border-bottom: 1px solid #f0f2f7 !important;
        border-top: none !important;
        font-size: 14px !important;
        white-space: normal !important;
    }
    .elementor-shortcode table td:last-child {
        border-bottom: none !important;
        padding-top: 10px !important;
        flex-direction: column !important;
        align-items: stretch !important;
    }
    .elementor-shortcode table td::before {
        content: attr(data-label) !important;
        font-weight: 700 !important;
        font-size: 12px !important;
        text-transform: uppercase !important;
        color: #8a96ab !important;
        flex-shrink: 0 !important;
        margin-right: 12px !important;
        display: block !important;
    }
    .elementor-shortcode table td[data-label="Actions"] {
        flex-direction: column !important;
        align-items: stretch !important;
    }
    .elementor-shortcode .gcal-button,
    .elementor-shortcode .cancel-meeting,
    .elementor-shortcode .accept-meeting,
    .elementor-shortcode .reject-meeting,
    .elementor-shortcode .edit-meeting {
        width: 100% !important;
        height: 40px !important;
        margin: 0 0 8px 0 !important;
    }
    .elementor-shortcode .bm-video-call { width: 100% !important; }
    .elementor-shortcode .bm-video-call .um-bm-video-btn,
    .elementor-shortcode .bm-video-call a,
    .elementor-shortcode .bm-video-call button {
        width: 100% !important;
        height: 40px !important;
    }
}


/* ============================================================
   Modal — #umMeetingModal (Schedule a meeting)
   Явні стилі щоб тема/інші плагіни не могли змінити вигляд
   ============================================================ */
#umMeetingModal {
    position: fixed !important;
    z-index: 10000 !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 90% !important;
    max-width: 400px !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}
#umMeetingModal .modal-content {
    background: #ffffff !important;
    border-radius: 12px !important;
    padding: 24px 20px !important;
    box-shadow: 0 8px 32px rgba(0,0,0,.18) !important;
    box-sizing: border-box !important;
    position: relative !important;
}
#umMeetingModal h2 {
    margin-top: 0 !important;
    font-size: 20px !important;
    color: #5a02ba !important;
    text-align: center !important;
}
#umMeetingModal .close {
    position: absolute !important;
    right: 14px !important;
    top: 10px !important;
    cursor: pointer !important;
    font-size: 22px !important;
    color: #999 !important;
    line-height: 1 !important;
}
#umMeetingModal input[type="date"],
#umMeetingModal select {
    width: 100% !important;
    padding: 9px 10px !important;
    margin-top: 12px !important;
    border: 1px solid #ddd !important;
    border-radius: 7px !important;
    font-size: 14px !important;
    box-sizing: border-box !important;
    background: #fff !important;
    color: #333 !important;
}
#umMeetingModal button#sendMeetingRequest {
    width: 100% !important;
    background: #5a02ba !important;
    color: #fff !important;
    border: none !important;
    padding: 11px !important;
    margin-top: 16px !important;
    border-radius: 7px !important;
    cursor: pointer !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    height: auto !important;
    display: block !important;
}
#umMeetingModal button#sendMeetingRequest:hover {
    background: #7e03e1 !important;
}

/* ============================================================
   Modal — #editMeetingModal (Edit meeting)
   ============================================================ */
#editMeetingModal {
    display: none;
    position: fixed !important;
    z-index: 10000 !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 400px;
    max-width: 92vw;
    background: #fff !important;
    border-radius: 12px !important;
    box-shadow: 0 6px 24px rgba(0,0,0,.18) !important;
    padding: 24px !important;
    box-sizing: border-box;
}
.modal-overlay {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,.45);
}
#editMeetingModal .close {
    position: absolute;
    right: 16px; top: 12px;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    color: #888;
}
#editMeetingModal input,
#editMeetingModal select {
    width: 100%;
    padding: 9px 10px;
    margin-top: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 14px;
}
#editMeetingModal button {
    width: 100%;
    background: #1a73e8 !important;
    color: #fff !important;
    border: none !important;
    padding: 11px !important;
    margin-top: 16px;
    border-radius: 7px !important;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    height: auto !important;
}
#editMeetingModal button:hover { background: #1558b0 !important; }

.entry-content { margin-top: 0 !important; padding-top: 0 !important; }
