/* Main date separator container */
.date-separator {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0 15px 0;
    position: relative;
    clear: both;
    width: 100%;
}

/* Date badge styling (WhatsApp-like) */
.date-separator .date-badge {
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
    z-index: 2;
    position: relative;
    text-align: center;
    letter-spacing: 0.3px;
}

/* Alternative light theme style */
.date-separator.light .date-badge {
    background: #e1f5fe;
    color: #0277bd;
    border: 1px solid rgba(2, 119, 189, 0.2);
    box-shadow: 0 1px 2px rgba(2, 119, 189, 0.1);
}

/* Dark theme support */
.dark-theme .date-separator .date-badge,
.chat-dark .date-separator .date-badge {
    background: rgba(255, 255, 255, 0.15);
    color: #e0e0e0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Admin chat specific styling */
.admin-chat .date-separator {
    margin: 25px 0 20px 0;
}

.admin-chat .date-separator .date-badge {
    background: #667eea;
    color: white;
    font-size: 11px;
    padding: 5px 10px;
    border-radius: 10px;
    font-weight: 600;
}

/* Customer chat styling */
.customer-chat .date-separator .date-badge {
    background: rgba(0, 0, 0, 0.7);
    color: white;
}

/* Today indicator special styling */
.date-separator.today .date-badge {
    background: #797979;
    color: white;
}

/* Yesterday indicator */
.date-separator.yesterday .date-badge {
    background: #ff9800;
    color: white;
}

/* Animation for new date separators */
@keyframes fadeInDate {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.date-separator.new {
    animation: fadeInDate 0.3s ease-out;
}


/* Message spacing adjustments */
.message + .date-separator {
    margin-top: 25px;
}

.date-separator + .message {
    margin-top: 15px;
}

/* Responsive design */
@media (max-width: 768px) {
    .date-separator {
        margin: 15px 0 12px 0;
    }
    
    .date-separator .date-badge {
        font-size: 11px;
        padding: 5px 10px;
        border-radius: 10px;
    }
    
    .admin-chat .date-separator {
        margin: 20px 0 15px 0;
    }
}

@media (max-width: 480px) {
    .date-separator {
        margin: 12px 0 10px 0;
    }
    
    .date-separator .date-badge {
        font-size: 10px;
        padding: 4px 8px;
        border-radius: 8px;
    }
}

/* Print styles */
@media print {
    .date-separator .date-badge {
        background: #f0f0f0 !important;
        color: #333 !important;
        border: 1px solid #ccc !important;
        box-shadow: none !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .date-separator .date-badge {
        background: #000;
        color: #fff;
        border: 2px solid #fff;
    }
    
    .dark-theme .date-separator .date-badge {
        background: #fff;
        color: #000;
        border: 2px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .date-separator.new {
        animation: none;
    }
    
    .admin-chat .date-separator .date-badge {
        transition: none;
    }
}