﻿/* === Global styling === */

html, body {
    overflow-x: hidden !important;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow-y: auto;
    background-color: #f7f9fc; /* light background to contrast cards */
}

body {
    padding-top: 48px;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
}

/* === Inbox list styling === */

.inbox-list {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 15px 60px;
}

/* --- Inbox Row as white card with subtle shadow --- */
.inbox-row {
    background-color: #fff; /* pure white card */
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08); /* subtle shadow */
    padding: 16px 20px;
    margin-bottom: 18px;
    position: relative;
    display: flex;
    gap: 16px;
    transition: box-shadow 0.25s ease;
}

    .inbox-row:hover {
        box-shadow: 0 6px 15px rgba(0,0,0,0.12);
    }

    .inbox-row.unread {
        background-color: #fefefe; /* slight highlight for unread */
        /* Optionally add a subtle border or shadow for unread */
        /* border: 2px solid #5a9bff; */
    }

/* --- Avatar column and image --- */
.avatar-col {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    background-color: #e1e5ea;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ddd;
}

.avatar-img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 50%;
    display: block;
    border: none;
}

.avatar-fallback {
    color: #fff;
    font-weight: 700;
    font-size: 1.25rem;
    text-transform: uppercase;
    user-select: none;
    background: #6c757d; /* muted gray fallback */
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Content column --- */
.content-col {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* --- Top row: name and date --- */
.top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.user-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: #212529;
}

.message-date {
    font-size: 0.875rem;
    color: #6c757d;
    white-space: nowrap;
}

/* --- Status badge --- */
.status-row {
    margin-bottom: 6px;
}

.badge-status {
    display: inline-block;
    padding: 0.28em 0.75em;
    border-radius: 999px;
    font-size: 0.96em;
    font-weight: 500;
    letter-spacing: 0.02em;
    margin-bottom: 2px;
    background: #f3f3f8;
    color: #3e3e40;
    border: 1px solid #e0e2ed;
}

.badge-status-inquiry {
    background: #e7f1fd !important;
    color: #1460aa !important;
    border: 1px solid #b6d5fa !important;
}

.badge-status-error, /* for expired, withdrawn, canceled */
.badge-status-expired,
.badge-status-withdrawn,
.badge-status-canceled,
.badge-status-cancelled {
    background: #fde5e5 !important;
    color: #d23737 !important;
    border: 1px solid #fabbbb !important;
}

/* Optionally, add for green success */
.badge-status-accepted {
    background: #e4f7ec;
    color: #2e9156;
    border: 1px solid #b3e6c9;
}

/* --- Event summary (type, guests, dates) --- */
.event-summary {
    font-size: 0.9rem;
    color: #495057;
    margin-bottom: 6px;
}

    .event-summary span {
        display: inline-block;
    }

.dot {
    margin: 0 6px;
    color: #ced4da;
}

/* --- Preview text --- */
.preview-text {
    font-style: italic;
    font-size: 0.9rem;
    color: #6c757d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- Pagination --- */
.pagination {
    margin-top: 20px;
}

.page-item.disabled .page-link {
    pointer-events: none;
    opacity: 0.6;
}

.page-item.active .page-link {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: #fff;
}

/* --- Diagonal "New" Ribbon --- */
.ribbon-new {
    position: absolute;
    top: -10px;
    right: -32px;
    z-index: 20;
    display: inline-block;
    padding: 6px 38px 6px 16px;
    background: #e53935;
    color: #fff;
    font-weight: 600;
    font-size: 1em;
    border-radius: 7px;
    box-shadow: 0 4px 10px rgba(40,30,40,0.13);
    transform: rotate(27deg);
    border: 2.5px solid #fff;
    letter-spacing: 0.01em;
    text-shadow: 0 1.5px 8px rgba(0,0,0,0.10);
    pointer-events: none;
    min-width: 60px;
    text-align: center;
    line-height: 1.2;
}

/* Responsive tweaks */
@media (max-width: 600px) {
    .inbox-row {
        padding: 12px 10px;
        gap: 12px;
    }

    .avatar-col {
        width: 40px;
        height: 40px;
        border: 2px solid #ddd;
    }

    .avatar-img {
        width: 40px;
        height: 40px;
    }

    .avatar-fallback {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .ribbon-new {
        top: 7px;
        right: -20px;
        font-size: 0.92em;
        padding: 4px 22px 4px 10px;
    }
}
