.ai-info-no-scroll {
    overflow: hidden;
}

.single-product form.cart {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.single-product form.cart .single_add_to_cart_button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ai-info-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.ai-info-modal {
    background: #ffffff;
    border-radius: 12px;
    max-width: 640px;
    width: 100%;
    margin: 0 16px;
    padding: 18px 20px 12px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    transform: scale(1);
    opacity: 1;
}

.ai-info-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
}

.ai-info-modal-title {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 0.01em;
    margin: 0;
    color: #111111;
}

.ai-info-modal-close {
    border: none !important;
    background: transparent !important;
    font-size: 25px !important;
    line-height: 1 !important;
    cursor: pointer !important;
    padding: 0 !important;
    color: #555555 !important;
    box-shadow: none !important;
    outline: none !important;
}

.ai-info-modal-body {
    font-size: 14px;
    line-height: 1.5;
    color: #222222;
    overflow-y: auto;
    height: 0;
    max-height: 60vh;
    padding-right: 4px;
    position: relative;
    transition: height 0.45s ease;
}

/* minimal scrollbar */
.ai-info-modal-body::-webkit-scrollbar {
    width: 6px;
}

.ai-info-modal-body::-webkit-scrollbar-track {
    background: transparent;
}

.ai-info-modal-body::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.25);
    border-radius: 999px;
}

.ai-info-modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.35);
}

.ai-info-modal-body {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.25) transparent;
}

.ai-info-loading {
    font-size: 14px;
    color: #555555;
    margin-bottom: 10px;
}

.ai-info-content {
    margin-top: 4px;
}

.ai-info-content p {
    margin: 0 0 8px;
}

.ai-info-content ul,
.ai-info-content ol {
    padding-left: 18px;
    margin: 6px 0 10px;
}

.ai-info-content li {
    margin-bottom: 4px;
}

.ai-info-error {
    margin-top: 10px;
    font-size: 13px;
    color: #b3261e;
}

.ai-info-modal-footer {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 11px;
    line-height: 1.4;
    color: #555555;
    flex-shrink: 0;
}

.ai-info-disclaimer {
    margin: 0 0 4px;
}

.ai-info-meta {
    margin: 0;
    color: #888888;
}

.ai-info-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 25%;
    max-width: 25%;
    width: 25%;
    padding-top: 1rem;
    padding-right: 2.25rem;
    padding-bottom: 1rem;
    padding-left: 2.25rem;
    border-radius: 0;
    border: none;
    background-color: var(--wp--preset--color--contrast);
    color: var(--wp--preset--color--base, #ffffff);
    font-family: inherit;
    font-size: var(--wp--preset--font-size--medium, 1rem);
    line-height: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.08s ease, opacity 0.15s ease;
    box-sizing: border-box;
}

.ai-info-button:hover {
    opacity: 0.9;
}

.ai-info-button:active {
    transform: translateY(1px);
}

@media (max-width: 768px) {
    .single-product form.cart {
        gap: 0.5rem;
    }

    .ai-info-button {
        flex: 0 0 30%;
        max-width: 30%;
        width: 30%;
    }
}

@media (max-width: 480px) {
    .ai-info-modal {
        padding: 14px 14px 10px;
        border-radius: 10px;
    }

    .ai-info-modal-title {
        font-size: 16px;
    }

    .ai-info-modal-body {
        font-size: 13px;
    }

    .ai-info-button {
        flex: 1 0 100%;
        max-width: 100%;
        width: 100%;
        margin-top: 8px;
    }
}

@keyframes ai-scale-in-center {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes ai-scale-out-center {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(0.5);
        opacity: 0;
    }
}

.ai-info-modal-in {
    animation: ai-scale-in-center 0.2s ease-out both;
}

.ai-info-modal-out {
    animation: ai-scale-out-center 0.18s ease-in both;
}