/* Unit 1.3 — featured chat preview in AP Euro Explore */

@keyframes ap-euro-folder-1-3-enter {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes ap-euro-chat-msg-in {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.explore-hub-folder-tile[data-ap-euro-sub='1.3'] {
    animation: ap-euro-folder-1-3-enter 0.55s cubic-bezier(0.22, 1, 0.36, 1) backwards;
    animation-delay: 0.08s;
}

.ap-euro-explore-chat-dropdown {
    margin: 0;
}

.ap-euro-explore-chat-summary {
    display: flex;
    align-items: center;
    gap: 0.65rem 0.85rem;
    flex-wrap: wrap;
    list-style: none;
    cursor: pointer;
    user-select: none;
}

.ap-euro-explore-chat-summary::-webkit-details-marker {
    display: none;
}

.ap-euro-explore-chat-summary::marker {
    content: '';
}

.ap-euro-explore-chat-summary-main {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
    flex: 1 1 auto;
    min-width: 0;
    text-align: left;
}

.ap-euro-explore-chat-summary-title {
    margin: 0;
}

.ap-euro-explore-chat-summary-sub {
    margin: 0 !important;
}

.ap-euro-explore-chat-summary .explore-ap-euro-cer-icon {
    margin-bottom: 0;
    flex-shrink: 0;
}

.ap-euro-explore-chat-chevron {
    flex-shrink: 0;
    width: 1.5rem;
    height: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.2s ease;
}

.ap-euro-explore-chat-chevron::before {
    content: '';
    width: 0.45rem;
    height: 0.45rem;
    border-right: 2px solid #94a3b8;
    border-bottom: 2px solid #94a3b8;
    transform: rotate(45deg) translate(-1px, -1px);
}

.ap-euro-explore-chat-dropdown[open] .ap-euro-explore-chat-chevron {
    transform: rotate(180deg);
}

.ap-euro-explore-chat-summary:focus {
    outline: none;
}

.ap-euro-explore-chat-summary:focus-visible {
    border-radius: 12px;
    box-shadow: 0 0 0 2px rgba(61, 214, 140, 0.45);
}

.explore-ap-euro-cer--chat-preview .ap-euro-explore-chat-card {
    position: relative;
    overflow: hidden;
}

.explore-ap-euro-cer--chat-preview .ap-euro-explore-chat-card::before {
    content: '';
    position: absolute;
    inset: -40% -20% auto;
    height: 60%;
    background: radial-gradient(ellipse at 50% 0%, rgba(61, 214, 140, 0.12), transparent 55%);
    pointer-events: none;
}

.ap-euro-explore-chat-subtitle {
    font-style: italic;
    color: #94a3b8 !important;
}

.ap-euro-explore-chat-thread {
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    text-align: left;
    max-height: min(70vh, 560px);
    overflow-y: auto;
    padding-right: 0.25rem;
}

.ap-euro-explore-chat-msg {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
    animation: ap-euro-chat-msg-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) backwards;
    animation-delay: calc(0.08s + var(--ap-euro-chat-i, 0) * 0.05s);
    max-width: 100%;
}

.ap-euro-explore-chat-msg--grace {
    flex-direction: row;
    align-self: flex-start;
}

.ap-euro-explore-chat-msg--ash {
    flex-direction: row-reverse;
    align-self: flex-end;
}

.ap-euro-explore-chat-msg-body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    min-width: 0;
    max-width: min(100%, 38rem);
}

.ap-euro-explore-chat-msg--ash .ap-euro-explore-chat-msg-body {
    align-items: flex-end;
}

.ap-euro-explore-chat-avatar {
    flex-shrink: 0;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 800;
}

.ap-euro-explore-chat-msg--grace .ap-euro-explore-chat-avatar {
    background: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.ap-euro-explore-chat-msg--ash .ap-euro-explore-chat-avatar {
    background: rgba(139, 92, 246, 0.25);
    color: #ede9fe;
    border: 1px solid rgba(139, 92, 246, 0.35);
}

.ap-euro-explore-chat-bubble {
    max-width: min(100%, 42rem);
    padding: 0.55rem 0.75rem;
    border-radius: 14px;
    font-size: 0.88rem;
    line-height: 1.45;
}

.ap-euro-explore-chat-msg--grace .ap-euro-explore-chat-bubble {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
}

.ap-euro-explore-chat-msg--ash .ap-euro-explore-chat-bubble {
    background: linear-gradient(145deg, rgba(124, 58, 237, 0.35), rgba(91, 33, 182, 0.28));
    border: 1px solid rgba(167, 139, 250, 0.35);
    color: #f5f3ff;
}

.ap-euro-explore-chat-text {
    margin: 0;
}

.ap-euro-explore-chat-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: flex-end;
}

.ap-euro-explore-chat-msg--grace .ap-euro-explore-chat-tags {
    justify-content: flex-start;
}

.ap-euro-explore-chat-tag {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.2rem 0.45rem;
    border-radius: 6px;
    background: rgba(61, 214, 140, 0.12);
    border: 1px solid rgba(61, 214, 140, 0.28);
    color: #a7f3d0;
}

.ap-euro-explore-chat-reaction {
    margin: 0;
    font-size: 0.72rem;
    color: #94a3b8;
    font-style: italic;
    line-height: 1.35;
}
