/* Clean and elegant modal styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.state-show {
    display: block;
    opacity: 1;
}

.modal-frame {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1001;
    display: none;
    justify-content: center;
    align-items: center;
    pointer-events: none;
    padding: 58px 20px 62px 20px;
}

.modal-frame.state-appear {
    display: flex;
    pointer-events: auto;
    animation: modalFadeIn 0.3s ease forwards;
}

.modal-frame.state-leave {
    animation: modalFadeOut 0.3s ease forwards;
}

.modal {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    width: min(420px, 90vw);
    max-height: calc(100vh - 120px);
    overflow: hidden;
    position: relative;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.modal-frame.state-appear .modal {
    transform: scale(1);
}

.modal-inset {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 20px;
    overflow: hidden;
}

.modal-body {
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
}

.button.close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1010;
    font-size: 18px;
    color: #666;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.button.close:hover {
    background: rgba(255, 255, 255, 1);
    color: #333;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.button.close:active {
    transform: scale(0.95);
}

.button.close i {
    font-size: 14px;
}

/* Clean X symbol */
.button.close:before {
    content: "×";
    font-size: 20px;
    line-height: 1;
    font-weight: 400;
}

.button.close i.fa-close:before {
    content: "";
}

body.modal-open {
    overflow: hidden;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes modalFadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.95);
    }
}

/* Clean Stripe pricing table styles */
.stripe-pricing-table {
    width: 100%;
    min-width: 320px;
    border-radius: 20px;
    overflow: hidden;
}

/* Fix spacing for Stripe pricing table content - doesn't work*/
.PricingTable {
    padding-top: 8px !important;
}

/* Simple modal content styling */
.modal-body {
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    border-radius: 20px;
}

@media (max-width: 768px) {
    .modal {
        width: min(380px, 85vw);
        max-height: 85vh;
        border-radius: 16px;
    }

    .modal-frame {
        padding: 50px 20px 54px 20px;
    }

    .modal-inset {
        border-radius: 16px;
    }

    .modal-body {
        border-radius: 16px;
    }

    .button.close {
        top: 18px;
        right: 18px;
        width: 30px;
        height: 30px;
    }

    .button.close:before {
        font-size: 18px;
    }

    stripe-pricing-table {
        border-radius: 16px;
    }
}

@media (max-width: 480px) {
    .modal {
        width: min(340px, 85vw);
        max-height: 85vh;
        border-radius: 12px;
    }

    .modal-frame {
        padding: 40px 15px 44px 15px;
    }

    .modal-inset {
        border-radius: 12px;
    }

    .modal-body {
        border-radius: 12px;
    }

    .button.close {
        top: 16px;
        right: 16px;
        width: 28px;
        height: 28px;
    }

    .button.close:before {
        font-size: 16px;
    }

    stripe-pricing-table {
        border-radius: 12px;
    }
}
