/* Tokens de EcoAlert. Un solo archivo: no duplicar estos valores en otro CSS. */
.ecoalert {
    --ecoalert-green: #06B68F;
    --ecoalert-green-dark: #16987b;
    --ecoalert-green-soft: #e6f7f3;
    --ecoalert-warning: #8a6d3b;
    --ecoalert-warning-soft: #fcf8e3;
    --ecoalert-danger: #d9534f;
    --ecoalert-danger-soft: #f2dede;
    --ecoalert-text: #666666;
    --ecoalert-muted: #868789;
    --ecoalert-line: #dddddd;
    --ecoalert-surface: #ffffff;
    --ecoalert-overlay: rgba(0, 0, 0, 0.45);
    --ecoalert-shadow: 0 18px 48px rgba(0, 0, 0, 0.16);
    --ecoalert-radius: 14px;
    --ecoalert-font: "Helvetica Neue", Helvetica, Arial, sans-serif;
    position: fixed;
    inset: 0;
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    font-family: var(--ecoalert-font);
}

.ecoalert[hidden] {
    display: none !important;
}

.ecoalert__overlay {
    position: absolute;
    inset: 0;
    background: var(--ecoalert-overlay);
}

.ecoalert__dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--ecoalert-surface);
    color: var(--ecoalert-text);
    border-radius: var(--ecoalert-radius);
    box-shadow: var(--ecoalert-shadow);
    padding: 28px 24px 20px;
    text-align: center;
    animation: ecoalert-in 160ms ease-out;
}

.ecoalert__icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ecoalert__icon svg {
    width: 26px;
    height: 26px;
    display: block;
}

.ecoalert__icon--info,
.ecoalert__icon--success,
.ecoalert__icon--confirm,
.ecoalert__icon--prompt {
    color: var(--ecoalert-green);
    background: var(--ecoalert-green-soft);
}

.ecoalert__icon--warning {
    color: var(--ecoalert-warning);
    background: var(--ecoalert-warning-soft);
}

.ecoalert__icon--error {
    color: var(--ecoalert-danger);
    background: var(--ecoalert-danger-soft);
}

.ecoalert__title {
    margin: 0 0 8px;
    font-size: 20px;
    line-height: 1.3;
    font-weight: 600;
    color: #444444;
}

.ecoalert__title--lead {
    font-size: 18px;
    font-weight: 700;
}

.ecoalert__message {
    margin: 0;
    font-size: 16px;
    line-height: 1.45;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-y: auto;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
}

.ecoalert__field {
    margin-top: 16px;
    text-align: left;
}

.ecoalert__label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    color: var(--ecoalert-muted);
}

.ecoalert__input {
    display: block;
    width: 100%;
    box-sizing: border-box;
    height: 40px;
    padding: 6px 12px;
    border: 1px solid var(--ecoalert-line);
    border-radius: 8px;
    font: inherit;
    font-size: 16px;
    color: #444444;
    background: var(--ecoalert-surface);
}

.ecoalert__input:focus {
    outline: 2px solid var(--ecoalert-green);
    outline-offset: 1px;
    border-color: var(--ecoalert-green);
}

.ecoalert__field-error {
    margin: 6px 0 0;
    color: var(--ecoalert-danger);
    font-size: 13px;
}

.ecoalert__actions {
    display: flex;
    justify-content: flex-end;
    flex-shrink: 0;
    gap: 10px;
    margin-top: 22px;
}

.ecoalert__btn {
    min-width: 112px;
    border-radius: 8px;
    padding: 8px 16px;
    font: inherit;
    font-size: 15px;
    line-height: 1.3;
    cursor: pointer;
    border: 1px solid transparent;
}

.ecoalert__btn:focus {
    outline: 2px solid var(--ecoalert-green);
    outline-offset: 2px;
}

.ecoalert__btn--ghost {
    background: var(--ecoalert-surface);
    color: var(--ecoalert-muted);
    border-color: var(--ecoalert-line);
}

.ecoalert__btn--ghost:hover,
.ecoalert__btn--ghost:focus {
    background: #f5f5f5;
    color: #555555;
}

.ecoalert__btn--primary {
    background: var(--ecoalert-green);
    border-color: var(--ecoalert-green);
    color: #ffffff;
}

.ecoalert__btn--primary:hover,
.ecoalert__btn--primary:focus {
    background: var(--ecoalert-green-dark);
    border-color: var(--ecoalert-green-dark);
    color: #ffffff;
}

.ecoalert__btn--danger {
    background: var(--ecoalert-danger);
    border-color: var(--ecoalert-danger);
    color: #ffffff;
}

.ecoalert__btn--danger:hover,
.ecoalert__btn--danger:focus {
    background: #c9302c;
    border-color: #c9302c;
    color: #ffffff;
}

@media (max-width: 480px) {
    .ecoalert {
        padding: 12px;
        align-items: flex-end;
    }

    .ecoalert__dialog {
        max-width: none;
        padding: 22px 16px 16px;
    }

    .ecoalert__actions {
        flex-direction: column-reverse;
    }

    .ecoalert__btn {
        width: 100%;
    }
}

@keyframes ecoalert-in {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ecoalert__dialog {
        animation: none;
    }
}
