/*********************************************************
    Modals
*********************************************************/

.bx-modal {
    display: none;
    flex-direction: column;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 20px 0;
}

.bx-modal--open {
    display: flex;
}

.bx-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.bx-modal-content {
    margin: auto;
    max-width: calc(100% - 32px);
    flex: none;
    z-index: 2;
}

.bx-modal-header {
    font-family: var(--second-family);
    font-weight: 500;
    font-size: 35px;
    line-height: normal;
    color: var(--siniy);
    margin-bottom: 20px;
}

.bx-modal-body {
    position: relative;
    width: 484px;
    padding: 40px;
    border-radius: 8px;
    background: var(--belyy);
    max-width: 100%;
    font-size: 16px;
    line-height: 120%;
    color: var(--chernyy);
}

.bx-modal-body--small {
    width: 436px;
}

.bx-modal-body--medium {
    width: 700px;
}

.bx-modal-body--medium-lg {
    width: 689px;
}

.bx-modal-body--medium-xl {
    width: 705px;
}

.bx-modal-body--large {
    width: 910px;
}

.bx-modal-body--xlarge {
    width: 1010px;
}

.bx-modal-body--auto {
    width: auto;
}

.bx-modal-close {
    position: absolute;
    top: 40px;
    right: 40px;
    width: 24px;
    height: 24px;
    background: transparent;
    border: none;
    padding: 0;
    outline: none;
    cursor: pointer;
    z-index: 10;
}

.bx-modal-close::before,
.bx-modal-close::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    margin-right: -50%;
    width: 22px;
    height: 2px;
    background: var(--siniy);
}

.bx-modal-close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.bx-modal-close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.bx-modal__title {
    font-weight: 700;
    font-size: 18px;
    line-height: 120%;
    text-align: center;
    margin: 0 0 40px;
}

body.bx-modal-open {
    overflow: hidden;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bx-modal--open .bx-modal-content {
    animation: modalFadeIn 0.3s ease-out;
}

.bx-modal-message {
    text-align: center;
    padding: 2rem;
    max-width: 400px;
    margin: 0 auto;
}

.bx-modal-message__header {
    margin-bottom: 1.5rem;
}

.bx-modal-message__icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bx-modal-message__title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.bx-modal-message__content {
    margin-bottom: 2rem;
    line-height: 1.5;
}

.bx-modal-message__footer {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* Темы для разных типов сообщений */
.bx-modal-message--success .bx-modal-message__icon {
    background: #d4edda;
    color: #155724;
}

.bx-modal-message--error .bx-modal-message__icon {
    background: #f8d7da;
    color: #721c24;
}

.bx-modal-message--info .bx-modal-message__icon {
    background: #d1ecf1;
    color: #0c5460;
}

.bx-modal-message--warning .bx-modal-message__icon {
    background: #fff3cd;
    color: #856404;
}