/* ==========================================================================
   RedNews 2 - FB Toast & Browser Notifications Stylesheet
   ========================================================================== */

/* 1. FB-STYLE BOTTOM FLOATING TOAST */
.rn-fb-toast-wrapper {
    position: fixed;
    bottom: 24px;
    z-index: 99998;
    max-width: 380px;
    width: calc(100% - 40px);
    pointer-events: none;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

.rn-fb-toast-wrapper.rn-pos-bottom-left {
    left: 20px;
}

.rn-fb-toast-wrapper.rn-pos-bottom-right {
    right: 20px;
}

.rn-fb-toast {
    background: var(--dt-card-bg, #ffffff);
    color: var(--dt-text, #1C232E);
    border: 1px solid var(--dt-border, #E2E8F0);
    border-radius: 14px;
    padding: 12px 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12), 0 1px 3px rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    pointer-events: auto;
    opacity: 0;
    transform: translateY(20px) scale(0.96);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.rn-fb-toast.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.rn-fb-toast-thumb-wrap {
    position: relative;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.rn-fb-toast-img {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    object-fit: cover;
    background: #E2E8F0;
}

.rn-fb-toast-badge {
    position: absolute;
    bottom: -4px;
    right: -4px;
    background: var(--dt-primary, #DE2910);
    color: #fff;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--dt-card-bg, #ffffff);
    display: flex;
    align-items: center;
    justify-content: center;
}

.rn-fb-toast-body {
    flex: 1;
    min-width: 0;
}

.rn-fb-toast-meta {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--dt-primary, #DE2910);
    text-transform: capitalize;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rn-fb-toast-title {
    display: block;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--dt-text, #1C232E);
    text-decoration: none;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rn-fb-toast-title:hover {
    color: var(--dt-primary, #DE2910);
}

.rn-fb-toast-time {
    display: block;
    font-size: 11px;
    color: var(--dt-text-muted, #8C98A9);
}

.rn-fb-toast-close {
    background: none;
    border: none;
    color: var(--dt-text-muted, #8C98A9);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 4px;
    margin-left: 4px;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
}

.rn-fb-toast-close:hover {
    color: var(--dt-text, #1C232E);
    background: var(--dt-bg, #F4F6F8);
}

/* 2. BROWSER NOTIFICATION PROMPT BANNER & FLOATING BELL */
.rn-push-bell-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99990;
    width: 46px;
    height: 46px;
    background: var(--dt-primary, #DE2910);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(222, 41, 16, 0.4);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s;
}

.rn-push-bell-widget:hover {
    transform: scale(1.08);
}

.rn-push-bell-ping {
    position: absolute;
    top: 0;
    right: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #FFDE00;
    border: 2px solid #ffffff;
    animation: rn-bell-ping 2s infinite;
}

@keyframes rn-bell-ping {
    0% { transform: scale(0.9); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.6; }
    100% { transform: scale(0.9); opacity: 1; }
}

.rn-push-prompt-banner {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    max-width: 380px;
    width: calc(100% - 40px);
    background: var(--dt-card-bg, #ffffff);
    border: 1px solid var(--dt-border, #E2E8F0);
    border-radius: 16px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.16);
    padding: 16px;
    animation: rn-banner-slide 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes rn-banner-slide {
    0% { opacity: 0; transform: translateY(-20px); }
    100% { opacity: 1; transform: translateY(0); }
}

.rn-push-prompt-inner {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rn-push-prompt-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(222, 41, 16, 0.1);
    color: var(--dt-primary, #DE2910);
    display: flex;
    align-items: center;
    justify-content: center;
}

.rn-push-prompt-text strong {
    font-size: 15px;
    color: var(--dt-text, #1C232E);
    display: block;
    margin-bottom: 4px;
}

.rn-push-prompt-text p {
    font-size: 13px;
    color: var(--dt-text-secondary, #5A6578);
    margin: 0;
    line-height: 1.4;
}

.rn-push-prompt-buttons {
    display: flex;
    gap: 10px;
    margin-top: 4px;
}

.rn-push-btn {
    flex: 1;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.rn-push-btn-allow {
    background: var(--dt-primary, #DE2910);
    color: #ffffff;
}

.rn-push-btn-allow:hover {
    background: var(--dt-primary-dark, #A81C07);
}

.rn-push-btn-dismiss {
    background: var(--dt-bg, #F4F6F8);
    color: var(--dt-text, #1C232E);
    border: 1px solid var(--dt-border, #E2E8F0);
}

.rn-push-btn-dismiss:hover {
    background: #E2E8F0;
}

@media (max-width: 600px) {
    .rn-fb-toast-wrapper {
        bottom: 12px;
        left: 12px !important;
        right: 12px !important;
        width: calc(100% - 24px);
    }
    .rn-push-prompt-banner {
        top: 10px;
        left: 10px;
        right: 10px;
        width: calc(100% - 20px);
    }
}
