﻿:root {
    --mdl-z: 1050;
    --mdl-bg: rgba(0, 0, 0, 0.5);
    --mdl-speed: 0.3s;
}

/* Backdrop */
.mdl-backdrop {
    position: fixed;
    inset: 0;
    background: var(--mdl-bg);
    opacity: 0;
    transition: opacity var(--mdl-speed) ease;
    z-index: var(--mdl-z);
    display: none;
}

    .mdl-backdrop.mdl-show {
        display: block;
        opacity: 1;
    }

/* Modal base */
.mdl {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--mdl-speed) ease;
    z-index: calc(var(--mdl-z) + 1);
    pointer-events: none;
    margin:auto;
}
.mdl-top {
    align-items: flex-start !important;
    margin-top: 5rem !important;
}
.mdl-center {
    align-items: center !important;
    margin-top: 0px !important;
}
    .mdl.mdl-show {
        opacity: 1;
        pointer-events: all;
    }

.mdl-dialog {
    background: #fff;
    border-radius: 0.25rem;
    width: 460px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
    transform: translateY(-20px);
    transition: transform var(--mdl-speed) cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: calc(var(--mdl-z) + 2);
}

.mdl.mdl-show .mdl-dialog {
    transform: translateY(0);
}

/* 🔥 Rebote tipo Bootstrap */
@keyframes mdl-bounce {
    0% {
        transform: scale(1);
    }

    20% {
        transform: scale(0.97) rotate(0.2deg);
    }

    50% {
        transform: scale(1.02) rotate(-0.2deg);
    }

    75% {
        transform: scale(0.99);
    }

    100% {
        transform: scale(1);
    }
}

.mdl-bounce {
    animation: mdl-bounce 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

.mdl-header {
    padding: 1rem 1rem 0rem;
    position: relative;
}

.mdl-footer {
    padding: 1rem;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.mdl-title {
    margin-bottom: 0;
    text-align: center;
    font-weight: normal !important;
}

.mdl-body {
    padding: 0.2rem 0rem 0.5rem;
}

.mdl-btn {
    display: inline-block;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    border: 1px solid transparent;
    padding: 0.2rem 0.6rem;
    border-radius: 0.375rem;
    font-size: 0.9rem;
    transition: opacity 0.2s ease;
}

    .mdl-btn:hover {
        opacity: 0.9;
    }

.mdl-btn-primary {
    color: #fff;
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.mdl-btn-secondary {
    color: #fff;
    background-color: #6c757d;
    border-color: #6c757d;
}

/* ❌ Botón de cierre */
.mdl-close {
    position: absolute;
    top: -1.4rem;
    right: -0.4rem;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: #6c757d;
    cursor: pointer;
    transition: color 0.2s ease;
}

    .mdl-close:hover {
        color: #000;
    }

    .mdl-close:focus {
        outline: none;
    }

.border-radius-0 {
    border-radius: 0 !important;
}

.mdl-header > i {
    font-size: 3.5rem;
}


@media (min-width: 640px) {

    .mdl-sm {
        width: 300px;
    }
    .mdl-md {
        width: 460px;
    }

    .mdl-lg {
        width: 600px;
    }
    .mdl-xl {
        width: 600px;
    }

}
@media (min-width: 900px) {

    .mdl-xl {
        width: 800px;
    }
}

@media (min-width: 1024px) {
    .mdl-lg {
        width: 750px;
    }
    .mdl-xl {
        width: 950px;
    }
}