/* ========== GLOBAL TABLE STYLES ========== */
.table-avatar {
    height: 40px !important;
    width: auto !important;
    margin-right: 0.25rem !important;
    border-radius: var(--radius-sm) !important;
    padding: 1px !important;
    background-color: #fff !important;
    border: 1px solid var(--border-glass) !important;
    box-shadow: var(--elevation-3) !important;
}

.offcanvas-logo-show {
    height: 60px !important;
    width: auto !important;
    margin-right: 0.5rem !important;
    border-radius: var(--radius-sm) !important;
    padding: 1px !important;
    background-color: #fff !important;
    border: 1px solid var(--border-glass) !important;
    box-shadow: var(--elevation-3) !important;
}

.td-scroll-list {
    max-height: 65px;
    overflow-y: auto;
    padding: 0.25rem 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

/* Email Template Preview Body Container */
.preview-body-container {
    background: var(--bg-glass-light) !important;
    box-shadow: var(--elevation-3);
    border: 2px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 1rem;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-x: hidden;
    overflow-y: auto;
    max-height: 600px;
    min-height: 300px;
    margin: 0 auto;
    width: 100%;
}

/* Ensure content inside preview fits the container (especially for fixed-width email tables) */
.preview-body-container.is-mobile table {
    width: 100% !important;
    height: auto !important;
}

.preview-body-container img {
    max-width: 100% !important;
    height: auto !important;
}

/* Attachment Pill Style - Glassmorphism */
.attachment-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    /* ~30% smaller */
    background: var(--bg-glass) !important;
    backdrop-filter: var(--blur-glass) !important;
    -webkit-backdrop-filter: var(--blur-glass) !important;
    border: 1px solid var(--border-glass-dark) !important;
    border-radius: 50rem;
    font-size: 0.75rem;
    /* ~30% smaller */
    font-weight: 500;
    color: var(--brand-primary) !important;
    margin-right: 0.35rem;
    margin-bottom: 0.35rem;
    transition: var(--transition-normal) !important;
    box-shadow: var(--elevation-1);
    text-decoration: none !important;
}

.attachment-pill:hover {
    background: var(--bg-glass-heavy) !important;
    border-color: var(--brand-primary) !important;
    box-shadow: var(--elevation-3);
    transform: translateY(-2px);
}

.attachment-pill a {
    color: var(--brand-primary) !important;
    text-decoration: none !important;
    display: flex;
    align-items: center;
}

.attachment-pill:hover a {
    color: var(--brand-primary) !important;
}

.attachment-pill i.fa-paperclip {
    margin-right: 0.35rem;
    /* Slightly smaller spacing */
    color: var(--brand-muted);
    transition: var(--transition-normal);
    font-size: 0.8rem;
    /* Smaller icon */
}

.attachment-pill:hover i.fa-paperclip {
    color: var(--brand-secondary);
}

.attachment-pill .remove-old-attachment {
    margin-left: 0.5rem;
    /* Slightly tighter */
    color: var(--brand-danger);
    cursor: pointer;
    font-size: 0.8rem;
    /* Smaller remove icon */
    padding: 3px;
    border-radius: 50%;
    transition: var(--transition-fast);
    opacity: 0.7;
}

.attachment-pill .remove-old-attachment:hover {
    background-color: rgba(220, 53, 69, 0.1);
    opacity: 1;
    transform: scale(1.1) rotate(90deg);
    /* Playful interaction */
}

.contact-check,
.lead-checkbox {
    scale: 1.5 !important;
}

/* Communication Timeline Scroll */
.comm-timeline-scroll {
    max-height: 300px;
    overflow-y: auto;
    padding-right: 4px;
}

.small-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
}

.small-label i {
    width: 18px;
    text-align: center;
}

.card-img {
    margin-bottom: 0.5rem;
}

/* WhatsApp Message Preview Styles */
.wa-preview-bg {
    background-color: #efeae2;
    background-image: url('../assets/img/wa-bg.png');
    background-repeat: repeat;
    border-radius: 12px;
    padding: 20px 15px;
    min-height: 480px;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.wa-bubble {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 8px 12px;
    position: relative;
    width: 100%;
    box-shadow: 0 1.5px 1px rgba(0, 0, 0, 0.15);
    margin-bottom: 4px;
    font-size: 13px;
    line-height: 1.4;
    color: #111b21;
    align-self: flex-start;
}

.wa-bubble.sent {
    background-color: #ffffff;
    align-self: flex-end;
    border-top-right-radius: 0;
}

.wa-header-prev {
    font-weight: 700;
    margin-bottom: 6px;
    display: block;
    font-size: 14px;
}

.wa-header-prev img {
    width: 100%;
    aspect-ratio: 1.91 / 1;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}

.wa-header-prev video {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 6px;
    display: block;
    background: #000;
}

.wa-body-prev {
    white-space: pre-wrap;
    word-wrap: break-word;
    font-size: 14px;
    font-weight: 500;
}

.wa-footer-prev {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    color: #667781;
    font-size: 12px;
    margin-top: 6px;
}

.wa-timestamp {
    margin-left: auto;
}

.wa-btn-container {
    display: flex;
    flex-direction: column;
    width: calc(100% + 24px);
    margin: 8px -12px 0 -12px;
}

.wa-btn-container.has-buttons {
    border-top: 1px solid rgba(0, 0, 0, 0.2);
}

.wa-btn-prev {
    background: white;
    color: #00a884;
    text-align: center;
    padding: 10px;
    font-weight: 500;
    cursor: default;
    width: 100%;
    font-size: 13.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.2);
}

.wa-btn-prev:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.wa-media-box {
    background-color: #fff5e9;
    border-radius: 6px 6px 0 0;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: -8px -12px 8px -12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.wa-media-box i {
    font-size: 40px;
    color: #ffa000;
    background: white;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* ========== PRIVACY POLICY PAGE ========== */

.policy-heading {
    color: var(--brand-primary);
    font-weight: 700;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.policy-subheading {
    color: var(--brand-primary);
    font-weight: 600;
    margin-top: 1.25rem;
    margin-bottom: 0.25rem;
}

.policy-content p {
    color: #000;
    line-height: 1.75;
    margin-bottom: 0.75rem;
}

.policy-content ul {
    color: #000;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.policy-content ul li {
    margin-bottom: 0.25rem;
    line-height: 1.65;
}
