/* ==========================================================================
   DIZAIN 8 — кнопка профиля и верхние уведомления
========================================================================== */

/* Обёртка кнопки в шапке */
.rl-dizain-8-header-btn-wrap {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    min-width: 90px !important;
    height: 100% !important;
    min-height: 20px !important;
}

/* ==========================================================================
   1. СТИЛИ ИЗОЛИРОВАННОЙ КНОПКИ
========================================================================== */

a.rl-isolated-header-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;

    margin-top: -10px !important;
    margin-bottom: -10px !important;
    margin-right: -1px !important;
    margin-left: 0 !important;

    max-width: 100% !important;
    box-sizing: border-box !important;
    white-space: nowrap !important;

    background-color: #0066CD !important;
    color: #ffffff !important;
    font-family: inherit !important;
    line-height: 1.2 !important;
    border-radius: 10px !important;
    text-decoration: none !important;
    border: none !important;

    filter: drop-shadow(0px 3px 5px rgba(0, 0, 0, 0.1)) !important;
    transition: filter 0.2s ease !important;
    box-shadow: none !important;
    outline: none !important;
}

@media (min-width: 769px) {
    a.rl-isolated-header-btn {
        font-size: 16px !important;
        font-weight: 600 !important;
        padding: 12px 15px !important;
    }
}

@media (max-width: 768px) {
    a.rl-isolated-header-btn {
        font-size: 14px !important;
        font-weight: 600 !important;
        padding: 12px 10px !important;
    }
}

a.rl-isolated-header-btn:active {
    filter: brightness(0.8) !important;
}

@media (hover: hover) {
    a.rl-isolated-header-btn:hover {
        text-decoration: none !important;
        filter: drop-shadow(0px 0px 0px rgba(0, 0, 0, 0)) brightness(0.8) !important;
    }
}

a.rl-isolated-header-btn.is-clicked {
    text-decoration: none !important;
    pointer-events: none !important;
    filter: drop-shadow(0px 0px 0px rgba(0, 0, 0, 0)) brightness(0.8) !important;
}

/* ==========================================================================
   2. СТИЛИ SWEETALERT2 / TOAST УВЕДОМЛЕНИЙ
========================================================================== */

div:where(.swal2-container) {
    font-family: 'Inter', sans-serif !important;
    z-index: 100 !important;
}

.swal2-container.swal2-top:has(.urgent-profile-toast) {
    z-index: 100 !important;
    overflow: visible !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
    box-sizing: border-box !important;
}

.urgent-profile-toast {
    position: relative !important;
    isolation: isolate !important;
    overflow: hidden !important;

    background: #ffffff !important;
    border: 2px solid #D93025 !important;
    border-radius: 10px !important;
    padding: 9px 20px !important;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5) !important;
    width: fit-content !important;
    max-width: calc(100vw - 50px) !important;
    box-sizing: border-box !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
}

.urgent-profile-toast .rl-urgent-marks-layer {
    position: absolute !important;
    inset: 0 !important;
    z-index: 0 !important;
    pointer-events: none !important;
    overflow: hidden !important;
    border-radius: 8px !important;
}

.urgent-profile-toast .rl-urgent-mark {
    position: absolute !important;
    top: -26px !important;

    font-family: 'Inter', sans-serif !important;
    font-weight: 700 !important;
    font-size: var(--rl-mark-size, 18px) !important;
    line-height: 1 !important;

    color: rgba(217, 48, 37, var(--rl-mark-opacity, 0.12)) !important;

    animation: rlUrgentMarkFall var(--rl-mark-duration, 10s) linear infinite !important;
    animation-delay: var(--rl-mark-delay, 0s) !important;

    will-change: transform, opacity !important;
}

@keyframes rlUrgentMarkFall {
    0% {
        transform: translate3d(0, -24px, 0) rotate(-2deg);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    45% {
        transform: translate3d(var(--rl-mark-sway-a, 5px), calc(var(--rl-mark-travel, 120px) * 0.45), 0) rotate(2deg);
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translate3d(var(--rl-mark-sway-b, -5px), var(--rl-mark-travel, 120px), 0) rotate(-2deg);
        opacity: 0;
    }
}

.urgent-profile-toast .swal2-title,
.urgent-profile-toast .swal2-html-container {
    position: relative !important;
    z-index: 1 !important;

    color: #D93025 !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: center !important;
}

.urgent-profile-toast .rl-toast-message-lines {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 4px !important;
    width: max-content !important;
    max-width: calc(100vw - 50px) !important;
    margin: 0 auto !important;
}

.urgent-profile-toast .rl-toast-message-line {
    display: block !important;
    color: #D93025 !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    line-height: 1.35 !important;
    text-align: center !important;
    white-space: nowrap !important;
}

.urgent-profile-toast .rl-toast-hide-hint {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    margin-top: 9px !important;
    padding: 2px 8px !important;

    border: 1px solid #5F6368 !important;
    border-radius: 10px !important;
    background: #F8FAFC !important;

    color: #5F6368 !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
}

.urgent-profile-toast.swal2-show {
    animation: toast-smooth-show 0.3s ease-out forwards !important;
}

.urgent-profile-toast.swal2-hide {
    animation: toast-smooth-hide 0.3s ease-in forwards !important;
}

@keyframes toast-smooth-show {
    0% {
        transform: translateY(-200px);
        opacity: 1;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes toast-smooth-hide {
    0% {
        transform: translateY(0);
        opacity: 1;
    }

    100% {
        transform: translateY(-100px);
        opacity: 1;
    }
}

@media (max-width: 600px) {
    .urgent-profile-toast {
        max-width: calc(100vw - 24px) !important;
        padding: 10px 14px !important;
    }

    .urgent-profile-toast .rl-toast-message-lines {
        max-width: 100% !important;
    }

    .urgent-profile-toast .rl-toast-message-line {
        white-space: normal !important;
    }
}