@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700&family=Plus+Jakarta+Sans:wght@600;700&display=swap');

.alert-wrapper {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0; left: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 999999;
}

.alert-frame {
    background: #1a1a1a;
    width: 320px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    animation: open-frame .4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.alert-header {
    display: flex;
    height: 150px;
    justify-content: center;
    align-items: center;
    position: relative;
}

.alert-img { height: 70px; }

.alert-body { padding: 25px; text-align: center; font-family: 'Plus Jakarta Sans', sans-serif; }
.alert-title { color: #fff; font-size: 20px; font-weight: 700; margin-bottom: 15px; display: block; }
.alert-message { color: #aaa; font-size: 14px; line-height: 1.6; margin-bottom: 25px; display: block; }

.alert-button, .confirm-button, .cancel-button {
    height: 40px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-family: 'Plus Jakarta Sans', sans-serif;
    transition: 0.3s;
    padding: 0 25px;
}

.toast-container {
    top: 25px;
    right: 25px;
    position: fixed;
    z-index: 999999;
    width: 360px;
}

.toast-frame {
    background: #16161a !important; /* Тёмный мат Re-Code */
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 18px !important;
    padding: 15px 20px !important;
    display: flex !important;
    align-items: center !important;
    position: relative !important;
    overflow: hidden !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
    margin-bottom: 10px;
    animation: slideInReCode 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.toast-container.hiding {
    animation: slideOutReCode 0.5s ease-in forwards !important;
}

.toast-img { width: 42px; height: 42px; object-fit: contain; }

.toast-message {
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #fff !important;
    margin-left: 15px !important;
    flex-grow: 1;
}

.toast-close {
    color: rgba(255, 255, 255, 0.3);
    font-size: 18px;
    cursor: pointer;
    margin-left: 15px;
    transition: 0.2s;
}
.toast-close:hover { color: #fff; }

.toast-timer {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    height: 4px !important;
    width: 100%;
    border-radius: 0 5px 5px 0;
    /* Анимация вызывается из JS через style.animation */
}

@keyframes timer { from { width: 100%; } to { width: 0%; } }

@keyframes slideInReCode {
    0% { transform: translateX(120%); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

@keyframes slideOutReCode {
    0% { transform: translateX(0); opacity: 1; }
    100% { transform: translateX(120%); opacity: 0; }
}

@keyframes open-frame {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.error-bg { background: #ea5455 !important; }
.success-bg { background: #28c76f !important; }
.warning-bg { background: #ff9f43 !important; }
.info-bg { background: #7367f0 !important; }
.question-bg { background: #00cfe8 !important; }

.error-timer { background: #ea5455; box-shadow: 0 0 10px rgba(234, 84, 85, 0.6); }
.success-timer { background: #28c76f; box-shadow: 0 0 10px rgba(40, 199, 111, 0.6); }
.warning-timer { background: #ff9f43; box-shadow: 0 0 10px rgba(255, 159, 67, 0.6); }
.info-timer { background: #7367f0; box-shadow: 0 0 10px rgba(115, 103, 240, 0.6); }