/* =========================================
   REFRESHED CHAT UI (Wishes)
   Based on Reference Design
   ========================================= */

/* Roboto Fonts */
@font-face {
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 700;
    font-display: block;
    src: url(https://fonts.gstatic.com/s/roboto/v30/KFOlCnqEu92Fr1MmWUlfBBc4AMP6lQ.woff2) format('woff2');
}

@font-face {
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 400;
    font-display: block;
    src: url(https://fonts.gstatic.com/s/roboto/v30/KFOmCnqEu92Fr1Mu4mxK.woff2) format('woff2');
}

/* Container */
.ref-chat-container {
    position: relative;
    width: 100%;
    background: #fffaec;
    border: 2px solid var(--primary-color);
    border-radius: 50px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 30px 20px 20px 20px;
}

/* Board (Wrapper for messages) */
.ref-chat-board {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Message Row */
.ref-chat-row {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 20px;
}

/* Avatar Group */
.ref-avatar-group {
    position: relative;
    width: 37px;
    height: 36px;
    flex-shrink: 0;
}

/* Avatar Circle - uses primary color */
.ref-avatar-circle {
    fill: var(--primary-gold);
}

/* Avatar Icon - white stroke */
.ref-avatar-icon {
    fill: none;
    stroke: #ffffff;
    stroke-width: 1.5;
    stroke-linecap: round;
}

/* Message Content Column */
.ref-message-col {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex-grow: 1;
}

/* Avatar External */
.ref-avatar-external {
    width: 37px;
    height: 36px;
    object-fit: contain;
    /* Make it white */
    filter: brightness(0) invert(1);
}

/* Message Meta (Name & Time) */
.ref-message-meta {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

.ref-message-name {
    font-family: "Roboto", sans-serif;
    font-weight: 700;
    font-size: 11px;
    color: rgba(0, 0, 0, 1);
    line-height: 1.2;
}

.ref-message-time {
    font-family: "Roboto", sans-serif;
    font-weight: 400;
    font-size: 11px;
    color: rgba(0, 0, 0, 0.35);
    line-height: 1.2;
}

/* Message Text */
.ref-message-text {
    font-family: "Roboto", sans-serif;
    font-weight: 400;
    font-size: 11px;
    color: rgba(89, 89, 89, 1);
    line-height: 1.4;
    white-space: pre-wrap;
}

/* Actions */
.ref-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    column-gap: 25px;
    row-gap: 2px;
    margin-top: 2px;
}

/* Action Group (icon + count) */
.ref-action-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    column-gap: 2px;
}

.ref-action-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    color: rgba(67, 67, 67, 1);
    transition: color 0.2s ease;
}

.ref-action-btn:hover {
    color: #c39068;
}

.ref-action-btn.delete-btn:hover {
    color: #ef4444;
}

/* Action Count */
.ref-action-count {
    font-family: "Roboto", sans-serif;
    font-weight: 400;
    font-size: 8px;
    color: rgba(67, 67, 67, 1);
    line-height: 1.2;
    height: 10px;
    text-rendering: geometricPrecision;
}

/* Read Icon (SVG) */
.ref-read-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* Reply threading visual (Optional) */
.ref-reply-thread {
    margin-left: 20px;
    border-left: 1px solid #e0e0e0;
    padding-left: 10px;
}

/* SVG Helpers */
.ref-icon-svg {
    width: 37px;
    height: 36px;
}

/* =========================================
   Legacy/Additional Chat Styles
   (Merged from chat-bubble.css)
   ========================================= */

#wishes-chat-container {
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    position: relative;
}

#wishes-chat-container::-webkit-scrollbar {
    display: none;
}

.chat-bubble {
    padding: 10px;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(9px);
    -webkit-backdrop-filter: blur(9px);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    margin-bottom: 12px;
    position: relative;
}

.chat-bubble-title .chat-bubble-author {
    font-size: 0.9rem !important;
    font-weight: bold;
    font-family: 'Playfair Display', serif;
    color: var(--primary-gold, #236871);
}

.chat-bubble-title .chat-bubble-date {
    font-size: 0.7rem !important;
    color: rgba(107, 114, 128, 1);
    /* Equivalent to standard gray */
}

.chat-bubble-body p {
    font-size: 0.9rem !important;
    color: #333;
    margin-bottom: 0;
    font-family: 'Marcellus', serif;
}

.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e9f0fb;
    color: #236871;
    font-weight: bold;
    font-size: 1rem;
    box-shadow: 0 2px 8px #23687122;
    margin-right: 6px;
}

.btn-reply {
    background: none;
    border: none;
    padding: 0;
    line-height: 1;
    color: #236871;
    transition: color 0.2s;
}

.btn-reply:hover {
    color: #5081A2;
}

@media (max-width: 600px) {
    .chat-item.ms-5 {
        margin-left: 1.2rem !important;
    }

    .avatar {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }

    .chat-bubble {
        padding: 8px;
    }
}