@use '../variables' as *;

.proddisp-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease-out;
}

.proddisp-modal {
    background: $white;
    border-radius: $border-radius-lg;
    box-shadow: $shadow-xl;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideInUp 0.3s ease-out;

    &.modal-small {
        width: 100%;
        max-width: 400px;
    }

    &.modal-medium {
        width: 100%;
        max-width: 600px;
    }

    &.modal-large {
        width: 100%;
        max-width: 800px;
    }

    &.modal-xlarge {
        width: 100%;
        max-width: 1000px;
    }

    .modal-header {
        padding: $spacing-lg;
        border-bottom: 1px solid $border-color;
        display: flex;
        align-items: center;
        justify-content: space-between;
        background: $background-light;

        .modal-title {
            margin: 0;
            font-size: 20px;
            font-weight: 600;
            color: $text-color;
        }

        .modal-close {
            background: none;
            border: none;
            padding: 8px;
            cursor: pointer;
            color: $text-light;
            border-radius: $border-radius;
            transition: all 0.2s ease;

            &:hover {
                background: $white;
                color: $text-color;
            }

            .dashicons {
                font-size: 18px;
                width: 18px;
                height: 18px;
            }
        }
    }

    .modal-content {
        padding: $spacing-lg;
        overflow-y: auto;
        flex: 1;

        .pro-upgrade-content {
            .premium-modal-close {
                display: none;
            }
        }
    }
}

// Confirm Modal Styles
.confirm-modal-content {
    text-align: center;
    padding: $spacing-md 0;

    .confirm-icon {
        margin-bottom: $spacing-lg;

        .dashicons {
            font-size: 48px;
            width: 48px;
            height: 48px;
            color: #dc3232;

            &.dashicons-warning {
                color: #ffb900;
            }

            &.dashicons-info {
                color: #00a0d2;
            }
        }
    }

    .confirm-message {
        margin-bottom: $spacing-xl;

        p {
            font-size: 16px;
            color: $text-color;
            line-height: 1.5;
            margin: 0;
        }
    }

    .confirm-actions {
        display: flex;
        gap: $spacing-md;
        justify-content: center;

        .button {
            padding: 10px 20px;
            font-size: 14px;

            &.button-danger {
                background: #dc3232;
                border-color: #dc3232;
                color: white;

                &:hover {
                    background: #c62d2d;
                    border-color: #c62d2d;
                }
            }

            &.button-warning {
                background: #ffb900;
                border-color: #ffb900;
                color: white;

                &:hover {
                    background: #e6a600;
                    border-color: #e6a600;
                }
            }
        }
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideInUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

// Responsive adjustments
@media (max-width: 768px) {
    .proddisp-modal-overlay {
        padding: 10px;
    }

    .proddisp-modal {

        &.modal-small,
        &.modal-medium,
        &.modal-large,
        &.modal-xlarge {
            max-width: none;
            width: 100%;
        }

        .modal-header {
            padding: $spacing-md;

            .modal-title {
                font-size: 18px;
            }
        }

        .modal-content {
            padding: $spacing-md;
        }
    }

    .confirm-modal-content .confirm-actions,
    .pro-upgrade-content .pro-actions {
        flex-direction: column;

        .button {
            width: 100%;
        }
    }
}