/* Meta Broadcast Frontend Styles */
* {
    box-sizing: border-box;
}

/* Container */
.meta-broadcast-container {
    max-width: 680px;
    margin: 0 auto 20px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow: hidden;
}

/* Form Container */
.meta-broadcast-form-container {
    max-width: 680px;
    margin: 0 auto 20px;
    background: #ffffff;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.meta-broadcast-form-header {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e4e6ea;
}

.meta-broadcast-form-avatar {
    width: 40px;
    height: 40px;
    margin-right: 12px;
    flex-shrink: 0;
}

.meta-broadcast-form-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.meta-broadcast-form-title {
    font-size: 18px;
    font-weight: 600;
    color: #1c1e21;
}

.meta-broadcast-textarea {
    width: 100%;
    min-height: 120px;
    border: none;
    resize: vertical;
    font-size: 16px;
    font-family: inherit;
    color: #1c1e21;
    outline: none;
    background: transparent;
    padding: 0;
    margin-bottom: 16px;
}

.meta-broadcast-textarea::placeholder {
    color: #65676b;
}

.meta-broadcast-media-preview {
    margin-bottom: 16px;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    display: none;
}

.meta-broadcast-media-preview img,
.meta-broadcast-media-preview video {
    width: 100%;
    height: auto;
    display: block;
}

.meta-broadcast-media-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.meta-broadcast-form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid #e4e6ea;
}

.meta-broadcast-media-buttons {
    display: flex;
    gap: 8px;
}

.meta-broadcast-media-btn {
    background: #f0f2f5;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    color: #65676b;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.meta-broadcast-media-btn:hover {
    background: #e4e6ea;
}

/* CHANGED: Form submit button - đổi từ #1877f2 sang #de1b1b */
.meta-broadcast-submit {
    background: #de1b1b;
    color: white;
    border: none;
    padding: 8px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

/* CHANGED: Form submit button hover - đổi từ #166fe5 sang #c51717 */
.meta-broadcast-submit:hover {
    background: #c51717;
}

.meta-broadcast-submit:disabled {
    background: #e4e6ea;
    color: #bcc0c4;
    cursor: not-allowed;
}

/* Broadcast Items */
.meta-broadcast-item {
    background: #ffffff;
    padding: 16px;
    border-bottom: 1px solid #e4e6ea;
    transition: background-color 0.2s ease;
}

.meta-broadcast-item:last-child {
    border-bottom: none;
}

.meta-broadcast-item:hover {
    background: #f8f9fa;
}

.meta-broadcast-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.meta-broadcast-avatar {
    width: 40px;
    height: 40px;
    margin-right: 12px;
    flex-shrink: 0;
    position: relative;
}

.meta-broadcast-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

/* CHANGED: Avatar fallback gradient - đổi sang màu đỏ */
.meta-broadcast-avatar-fallback {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #de1b1b, #ff4444);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 16px;
}

.meta-broadcast-author-info {
    flex: 1;
}

.meta-broadcast-author {
    font-weight: 600;
    color: #1c1e21;
    font-size: 15px;
    margin-bottom: 2px;
}

.meta-broadcast-time {
    color: #65676b;
    font-size: 13px;
}

.meta-broadcast-content {
    color: #1c1e21;
    font-size: 15px;
    line-height: 1.4;
    margin-bottom: 12px;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.meta-broadcast-media {
    margin-bottom: 12px;
    border-radius: 8px;
    overflow: hidden;
}

.meta-broadcast-media img,
.meta-broadcast-media video {
    width: 100%;
    height: auto;
    display: block;
}

.meta-broadcast-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 8px;
    border-top: 1px solid #e4e6ea;
}

.meta-broadcast-delete {
    background: #e41e3f;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.meta-broadcast-delete:hover {
    background: #c5102e;
}

/* Bell Notification */
.meta-broadcast-bell-container {
    position: relative;
    display: inline-block;
}

.meta-broadcast-bell-icon {
    position: relative;
    width: 40px;
    height: 40px;
    background: #f0f2f5;
    border-radius: 50%;
    cursor: pointer;
    color: #de1b1b;
    transition: all 0.2s ease;
    display: flex !important;
    align-items: center;
    justify-content: center;
    border: none;
    outline: none;
}

.meta-broadcast-bell-icon:hover {
    background: #e4e6ea;
    color: #c51717;
    transform: scale(1.05);
}

.meta-broadcast-bell-icon:active {
    transform: scale(0.95);
}

.meta-broadcast-bell-icon svg {
    width: 20px;
    height: 20px;
    pointer-events: none;
    fill: currentColor;
}

.meta-broadcast-bell-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #de1b1b;
    color: white;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    min-width: 18px;
    text-align: center;
    line-height: 1.2;
    display: none;
    z-index: 10;
}

.meta-broadcast-bell-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border: 1px solid #e4e6ea;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    width: 360px;
    max-height: 450px;
    z-index: 9999;
    display: none;
}

.meta-broadcast-bell-header {
    padding: 16px;
    border-bottom: 1px solid #e4e6ea;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.meta-broadcast-bell-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1c1e21;
}

/* CHANGED: Mark read button - đổi từ #1877f2 sang #de1b1b */
.meta-broadcast-bell-mark-read {
    background: none;
    border: none;
    color: #de1b1b;
    font-size: 14px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.meta-broadcast-bell-mark-read:hover {
    background: #f0f2f5;
}

.meta-broadcast-bell-list {
    max-height: 300px;
    overflow-y: auto;
}

/* Bell Footer with View All Button */
.meta-broadcast-bell-footer {
    padding: 12px 16px;
    border-top: 1px solid #e4e6ea;
    text-align: center;
}

/* CHANGED: View all button - đổi từ #1877f2 sang #de1b1b */
.meta-broadcast-bell-view-all {
    background: #de1b1b;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
    width: 100%;
}

/* CHANGED: View all button hover - đổi từ #166fe5 sang #c51717 */
.meta-broadcast-bell-view-all:hover {
    background: #c51717;
}

/* Bell Items with Expand/Collapse */
.meta-broadcast-bell-item {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f2f5;
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.meta-broadcast-bell-item:hover {
    background: #f8f9fa;
}

.meta-broadcast-bell-item:last-child {
    border-bottom: none;
}

.meta-broadcast-bell-item-header {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
}

.meta-broadcast-bell-item-avatar {
    width: 32px;
    height: 32px;
    margin-right: 8px;
    flex-shrink: 0;
}

.meta-broadcast-bell-item-avatar img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* CHANGED: Bell avatar fallback gradient - đổi sang màu đỏ */
.meta-broadcast-bell-item-avatar-fallback {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #de1b1b, #ff4444);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 12px;
}

.meta-broadcast-bell-item-info {
    flex: 1;
}

.meta-broadcast-bell-item-author {
    font-weight: 600;
    font-size: 13px;
    color: #1c1e21;
    margin-bottom: 2px;
}

.meta-broadcast-bell-item-time {
    font-size: 11px;
    color: #65676b;
}

/* Enhanced Bell Item Content with Expand/Collapse */
.meta-broadcast-bell-item-content {
    position: relative;
}

.meta-broadcast-bell-item-text {
    font-size: 13px;
    color: #1c1e21;
    line-height: 1.4;
    word-wrap: break-word;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: all 0.3s ease;
}

.meta-broadcast-bell-item-text.expanded {
    display: block;
    -webkit-line-clamp: unset;
    max-height: none;
}

.meta-broadcast-bell-item-text.no-clamp {
    display: block;
    -webkit-line-clamp: unset;
}

/* CHANGED: Bell expand button - đổi từ #1877f2 sang #de1b1b */
.meta-broadcast-bell-expand-btn {
    background: none;
    border: none;
    color: #de1b1b;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 2px 0;
    margin-top: 4px;
    transition: all 0.2s ease;
    display: inline-block;
}

/* CHANGED: Bell expand button hover - đổi từ #166fe5 sang #c51717 */
.meta-broadcast-bell-expand-btn:hover {
    color: #c51717;
    text-decoration: underline;
}

/* CHANGED: Bell expand button focus - đổi từ #166fe5 sang #c51717 */
.meta-broadcast-bell-expand-btn:focus {
    outline: none;
    color: #c51717;
}

.meta-broadcast-bell-item-media {
    margin-top: 6px;
    border-radius: 4px;
    overflow: hidden;
}

.meta-broadcast-bell-item-media img {
    width: 100%;
    max-height: 80px;
    object-fit: cover;
    display: block;
}

/* Modal Styles */
.meta-broadcast-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.meta-broadcast-modal-overlay.show {
    display: flex;
    opacity: 1;
}

.meta-broadcast-modal {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.meta-broadcast-modal-overlay.show .meta-broadcast-modal {
    transform: scale(1);
}

.meta-broadcast-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e4e6ea;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.meta-broadcast-modal-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #1c1e21;
}

.meta-broadcast-modal-close {
    background: #f0f2f5;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #65676b;
    transition: all 0.2s ease;
}

.meta-broadcast-modal-close:hover {
    background: #e4e6ea;
    color: #1c1e21;
}

.meta-broadcast-modal-content {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.meta-broadcast-modal-list {
    flex: 1;
    overflow-y: auto;
    max-height: calc(80vh - 140px);
}

.meta-broadcast-modal-item {
    padding: 16px 24px;
    border-bottom: 1px solid #f0f2f5;
    transition: background-color 0.2s ease;
}

.meta-broadcast-modal-item:hover {
    background: #f8f9fa;
}

.meta-broadcast-modal-item:last-child {
    border-bottom: none;
}

.meta-broadcast-modal-item-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.meta-broadcast-modal-item-avatar {
    width: 40px;
    height: 40px;
    margin-right: 12px;
    flex-shrink: 0;
}

.meta-broadcast-modal-item-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

/* CHANGED: Modal avatar fallback gradient - đổi sang màu đỏ */
.meta-broadcast-modal-item-avatar-fallback {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #de1b1b, #ff4444);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 16px;
}

.meta-broadcast-modal-item-info {
    flex: 1;
}

.meta-broadcast-modal-item-author {
    font-weight: 600;
    font-size: 15px;
    color: #1c1e21;
    margin-bottom: 2px;
}

.meta-broadcast-modal-item-time {
    font-size: 13px;
    color: #65676b;
}

.meta-broadcast-modal-item-content {
    font-size: 15px;
    color: #1c1e21;
    line-height: 1.4;
    margin-bottom: 8px;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.meta-broadcast-modal-item-media {
    margin-top: 8px;
    border-radius: 8px;
    overflow: hidden;
}

.meta-broadcast-modal-item-media img,
.meta-broadcast-modal-item-media video {
    width: 100%;
    height: auto;
    display: block;
}

.meta-broadcast-modal-load-more {
    padding: 16px 24px;
    text-align: center;
    border-top: 1px solid #e4e6ea;
    flex-shrink: 0;
}

/* CHANGED: Modal load more button - đổi từ #1877f2 sang #de1b1b */
.meta-broadcast-modal-load-more-btn {
    background: #de1b1b;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
    min-width: 120px;
}

/* CHANGED: Modal load more button hover - đổi từ #166fe5 sang #c51717 */
.meta-broadcast-modal-load-more-btn:hover {
    background: #c51717;
}

.meta-broadcast-modal-load-more-btn:disabled {
    background: #e4e6ea;
    color: #bcc0c4;
    cursor: not-allowed;
}

/* Status Messages */
.meta-broadcast-loading,
.meta-broadcast-empty,
.meta-broadcast-error,
.meta-broadcast-notice {
    text-align: center;
    padding: 40px 20px;
    color: #65676b;
    font-size: 15px;
}

.meta-broadcast-bell-loading,
.meta-broadcast-bell-empty,
.meta-broadcast-modal-loading,
.meta-broadcast-modal-empty {
    text-align: center;
    padding: 20px;
    color: #65676b;
    font-size: 14px;
}

.meta-broadcast-error {
    color: #e41e3f;
}

/* CHANGED: Notice background - đổi từ #1877f2 sang #de1b1b */
.meta-broadcast-notice {
    color: #de1b1b;
    background: #fff0f0;
    border: 1px solid #ffd6d6;
    border-radius: 8px;
    margin: 16px 0;
}

/* Hidden Elements */
.meta-broadcast-file-input {
    position: absolute !important;
    left: -9999px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .meta-broadcast-container,
    .meta-broadcast-form-container {
        margin: 0 16px 20px;
        border-radius: 0;
    }
    
    .meta-broadcast-form-actions {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .meta-broadcast-media-buttons {
        justify-content: center;
    }
    
    .meta-broadcast-bell-dropdown {
        width: 320px;
        right: -20px;
    }
    
    .meta-broadcast-bell-icon {
        width: 44px;
        height: 44px;
    }
    
    .meta-broadcast-bell-icon svg {
        width: 22px;
        height: 22px;
    }
    
    .meta-broadcast-modal {
        width: 95%;
        max-height: 90vh;
        margin: 20px;
    }
    
    .meta-broadcast-modal-header {
        padding: 16px 20px;
    }
    
    .meta-broadcast-modal-header h2 {
        font-size: 18px;
    }
    
    .meta-broadcast-modal-item {
        padding: 12px 20px;
    }
    
    .meta-broadcast-modal-load-more {
        padding: 12px 20px;
    }
}

@media (max-width: 480px) {
    .meta-broadcast-bell-dropdown {
        width: 280px;
        right: -40px;
    }
    
    .meta-broadcast-modal {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
        margin: 0;
    }
    
    .meta-broadcast-modal-list {
        max-height: calc(100vh - 120px);
    }
}

/* Scrollbar Styling */
.meta-broadcast-bell-list::-webkit-scrollbar,
.meta-broadcast-modal-list::-webkit-scrollbar {
    width: 6px;
}

.meta-broadcast-bell-list::-webkit-scrollbar-track,
.meta-broadcast-modal-list::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.meta-broadcast-bell-list::-webkit-scrollbar-thumb,
.meta-broadcast-modal-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.meta-broadcast-bell-list::-webkit-scrollbar-thumb:hover,
.meta-broadcast-modal-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* CHANGED: Accessibility - Focus outlines đổi từ #1877f2 sang #de1b1b */
.meta-broadcast-bell-icon:focus,
.meta-broadcast-modal-close:focus,
.meta-broadcast-bell-expand-btn:focus {
    outline: 2px solid #de1b1b;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .meta-broadcast-bell-container,
    .meta-broadcast-modal-overlay {
        display: none !important;
    }
}

/* ADDED: Notification Styles with red theme */
.meta-broadcast-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 16px;
    border-radius: 6px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    z-index: 100000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    max-width: 300px;
    word-wrap: break-word;
}

.meta-broadcast-notification.show {
    transform: translateX(0);
}

.meta-broadcast-notification-success {
    background: #42a163;
}

.meta-broadcast-notification-error {
    background: #e41e3f;
}

/* CHANGED: Info notification - đổi từ #1877f2 sang #de1b1b */
.meta-broadcast-notification-info {
    background: #de1b1b;
}

@media (max-width: 768px) {
    .meta-broadcast-notification {
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(-100%);
    }
    
    .meta-broadcast-notification.show {
        transform: translateY(0);
    }
}



