﻿.smart-messages-host {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#topBar {
    z-index: 10140 !important;
}

.smart-messages-game-host {
    position: fixed;
    top: 12px;
    left: 14px;
    z-index: 10150;
}

.smart-messages-header-host {
    flex: 0 0 auto;
    position: relative;
    z-index: 10150;
}

.smart-messages-button {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: #ffffff;
    color: #52388a;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.16);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    font-size: 18px;
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.smart-messages-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.2);
}

.smart-messages-header-host .smart-messages-button {
    width: 38px;
    height: 38px;
    border-radius: 20px;
    background: #f7f9fb;
    color: #52388a;
    box-shadow: none;
    border: 1px solid rgba(82, 56, 138, 0.12);
    font-size: 17px;
}

.smart-messages-header-host .smart-messages-button:hover {
    background: #f1f5f9;
    box-shadow: 0 8px 18px rgba(82, 56, 138, 0.12);
}

.smart-messages-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #dc2626;
    color: #ffffff;
    font-size: 11px;
    font-weight: 900;
    line-height: 18px;
    text-align: center;
    display: none;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    z-index: 2;
    pointer-events: none;
}

.smart-messages-badge.has-unread {
    display: inline-flex;
}

.smart-messages-panel {
    position: fixed;
    top: 64px;
    left: 14px;
    width: min(390px, calc(100vw - 28px));
    max-height: calc(100vh - 92px);
    overflow: hidden;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 22px 58px rgba(15, 23, 42, 0.24);
    border: 1px solid rgba(15, 23, 42, 0.1);
    z-index: 10160;
    direction: rtl;
    display: none;
}

.smart-messages-panel.is-open {
    display: flex;
    flex-direction: column;
}

.smart-messages-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid #edf2f7;
}

.smart-messages-panel-title {
    margin: 0;
    color: #1f2937;
    font-size: 1.08rem;
    font-weight: 900;
}

.smart-messages-close {
    border: 0;
    background: #f1f5f9;
    color: #64748b;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
}

.smart-messages-list {
    overflow: auto;
    padding: 10px;
}

.smart-message-card {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
    padding: 12px 13px;
    margin-bottom: 10px;
}

.smart-message-card.unread {
    border-color: #bfdbfe;
    background: #f8fbff;
}

.smart-message-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.smart-message-tag {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    background: #eef2ff;
    color: #4338ca;
    font-size: 0.72rem;
    font-weight: 900;
}

.smart-message-date {
    color: #94a3b8;
    font-size: 0.76rem;
    font-weight: 700;
}

.smart-message-title {
    margin: 0 0 6px;
    color: #111827;
    font-size: 0.98rem;
    font-weight: 900;
    line-height: 1.35;
}

.smart-message-body {
    margin: 0;
    color: #4b5563;
    font-size: 0.9rem;
    line-height: 1.55;
}

.smart-message-action {
    margin-top: 10px;
    border: 0;
    border-radius: 7px;
    background: #91c852;
    color: #1f2937;
    min-height: 34px;
    padding: 0 13px;
    font-family: 'Heebo', sans-serif;
    font-size: 0.86rem;
    font-weight: 900;
    cursor: pointer;
}

.smart-messages-empty {
    padding: 28px 14px;
    color: #64748b;
    text-align: center;
    font-weight: 700;
}

.smart-messages-footer {
    display: flex;
    justify-content: center;
    padding: 12px;
    border-top: 1px solid #edf2f7;
}

.smart-messages-all-link {
    color: #52388a;
    text-decoration: none;
    font-weight: 900;
}

.smart-message-toast {
    position: fixed;
    left: 50%;
    top: 82px;
    transform: translateX(-50%);
    z-index: 10170;
    max-width: calc(100vw - 32px);
    padding: 11px 16px;
    border-radius: 10px;
    background: #10203e;
    color: #ffffff;
    font-family: 'Heebo', sans-serif;
    font-weight: 800;
    display: none;
}

.smart-activity-feedback {
    position: fixed;
    top: clamp(34px, 6vh, 78px);
    left: 50%;
    right: auto;
    bottom: auto;
    transform: translateX(-50%);
    z-index: 2147483000;
    display: none;
    align-items: flex-start;
    justify-content: center;
    width: min(500px, calc(100vw - 36px));
    padding: 0;
    background: transparent;
    direction: rtl;
    pointer-events: none;
}

.smart-activity-feedback.is-open {
    display: block;
}

.smart-activity-feedback-card {
    position: relative;
    width: 100%;
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbfc 100%);
    border: 1px solid rgba(20, 128, 116, 0.28);
    box-shadow: 0 22px 48px rgba(15, 23, 42, 0.26), 0 0 0 5px rgba(20, 184, 166, 0.08);
    padding: 20px 22px 18px;
    font-family: 'Heebo', sans-serif;
    pointer-events: auto;
    animation: smartActivityPop 0.46s cubic-bezier(.18, .95, .25, 1.18);
    box-sizing: border-box;
}

.smart-activity-feedback-close {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: #eef7f6;
    color: #0f766e;
    font-size: 18px;
    font-weight: 900;
    cursor: pointer;
    transition: background 0.16s ease, transform 0.16s ease;
}

.smart-activity-feedback-close:hover {
    background: #d9f2ef;
    transform: scale(1.04);
}

.smart-activity-feedback-tag {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    background: #e0f2f1;
    color: #0f766e;
    font-size: 0.75rem;
    font-weight: 900;
    margin-bottom: 10px;
}

.smart-activity-feedback-title {
    margin: 0 34px 8px 0;
    color: #101828;
    font-size: 1.2rem;
    font-weight: 900;
    line-height: 1.35;
}

.smart-activity-feedback-body {
    margin: 0;
    color: #344054;
    font-size: 0.96rem;
    font-weight: 750;
    line-height: 1.6;
}

.smart-activity-feedback-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.smart-activity-feedback-ok,
.smart-activity-feedback-action {
    border: 0;
    border-radius: 9px;
    min-height: 40px;
    padding: 0 16px;
    font-family: 'Heebo', sans-serif;
    font-size: 0.9rem;
    font-weight: 900;
    cursor: pointer;
    transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.smart-activity-feedback-ok:hover,
.smart-activity-feedback-action:hover {
    transform: translateY(-1px);
}

.smart-activity-feedback-ok {
    background: #eef4f4;
    color: #0f766e;
    border: 1px solid rgba(15, 118, 110, 0.18);
}

.smart-activity-feedback-action {
    background: #0f766e;
    color: #ffffff;
    box-shadow: 0 10px 20px rgba(15, 118, 110, 0.24);
}

.smart-activity-feedback-action:hover {
    background: #0b625c;
    box-shadow: 0 14px 24px rgba(15, 118, 110, 0.3);
}

.smart-activity-feedback-flyer {
    position: fixed;
    z-index: 2147483001;
    pointer-events: none;
    transform-origin: center center;
    box-sizing: border-box;
    overflow: hidden;
    will-change: transform, left, top, opacity;
}

.smart-messages-button-pulse {
    animation: smartMailboxPulse 0.62s ease;
}

@keyframes smartMailboxPulse {
    0%, 100% {
        transform: scale(1);
    }
    42% {
        transform: scale(1.16);
    }
}

@keyframes smartActivityPop {
    0% {
        opacity: 0;
        transform: translateY(-18px) scale(0.92);
    }
    62% {
        opacity: 1;
        transform: translateY(4px) scale(1.025);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 640px) {
    .smart-messages-game-host {
        top: 62px;
        left: 10px;
    }

    .smart-messages-panel {
        top: 58px;
        left: 10px;
        width: calc(100vw - 20px);
    }

    .smart-messages-header-host .smart-messages-button {
        width: 36px;
        height: 36px;
    }

    .smart-activity-feedback {
        top: 18px;
        width: calc(100vw - 24px);
    }

    .smart-activity-feedback-card {
        padding: 18px 18px 16px;
    }

    .smart-activity-feedback-title {
        font-size: 1.06rem;
    }

    .smart-activity-feedback-actions {
        justify-content: stretch;
    }

    .smart-activity-feedback-ok,
    .smart-activity-feedback-action {
        flex: 1 1 auto;
    }
}
