/**
 * Alert Modal Component
 * Кастомный попап для валидационных сообщений
 */

/* Modal Base */
.alert-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: var(--z-modal, 500);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.alert-modal.is-active {
    opacity: 1;
    visibility: visible;
}

/* Modal Container */
.alert-modal__container {
    position: relative;
    width: 90%;
    max-width: 480px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    overflow: hidden;
}

.alert-modal.is-active .alert-modal__container {
    transform: scale(1);
}

/* Modal Content */
.alert-modal__content {
    padding: 32px 24px 24px;
    text-align: center;
}

.alert-modal__icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--color-background, #F6F6F6);
}

.alert-modal__icon svg {
    width: 32px;
    height: 32px;
    color: var(--color-accent, #8FB56C);
}

.alert-modal__icon--warning svg {
    color: #F59E0B;
}

.alert-modal__icon--error svg {
    color: #EF4444;
}

.alert-modal__title {
    margin: 0 0 12px;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--color-text, #303030);
}

.alert-modal__message {
    margin: 0 0 24px;
    font-size: 16px;
    line-height: 1.5;
    color: var(--color-text-secondary, #4D4D4D);
}

/* Modal Actions */
.alert-modal__actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.alert-modal__button {
    min-width: 120px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.alert-modal__button--primary {
    background: var(--color-accent, #8FB56C);
    color: white;
}

.alert-modal__button--primary:hover {
    background: var(--color-accent-hover, #7EA35D);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(143, 181, 108, 0.3);
}

.alert-modal__button--secondary {
    background: var(--color-background, #F6F6F6);
    color: var(--color-text, #303030);
}

.alert-modal__button--secondary:hover {
    background: var(--color-border-light, #E5E5E5);
}

/* Responsive */
@media (max-width: 640px) {
    .alert-modal__container {
        width: 95%;
        margin: 16px;
    }

    .alert-modal__content {
        padding: 24px 20px 20px;
    }

    .alert-modal__icon {
        width: 56px;
        height: 56px;
        margin-bottom: 12px;
    }

    .alert-modal__icon svg {
        width: 28px;
        height: 28px;
    }

    .alert-modal__title {
        font-size: 18px;
    }

    .alert-modal__message {
        font-size: 14px;
        margin-bottom: 20px;
    }

    .alert-modal__actions {
        flex-direction: column;
    }

    .alert-modal__button {
        width: 100%;
        min-width: auto;
    }
}
