/* Modal Overlay */
.ix-net-modal {
    position: fixed;
    z-index: 9998;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    display: none !important;
}

.ix-net-modal.active {
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.ix-net-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
}

/* Modal Content - VIEL GRÖSSER */
.ix-net-modal-content {
    background-color: #fff;
    margin: 20px auto;
    padding: 0;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    width: 95%;
    max-width: 1400px;
    height: 85vh;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    z-index: 10000;
    position: relative;
    animation: slideIn 0.3s ease-in-out;
}

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

/* Modal Header */
.ix-net-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
    background-color: #fafafa;
}

.ix-net-modal-header h2 {
    margin: 0;
    font-size: 24px;
    color: #333;
}

.ix-net-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ix-net-modal-close:hover {
    color: #000;
    background-color: #e8e8e8;
    border-radius: 4px;
}

/* Modal Body - WICHTIG: Volle Höhe! */
.ix-net-modal-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
    min-height: 500px;
    width: 100%;
    display: flex;
}

#ix-net-plugin-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* imos Web Component Styling - KRITISCH */
imos-net-plugin {
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: column;
    min-height: 500px;
    flex: 1;
}

/* Modal Footer */
.ix-net-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 20px;
    border-top: 1px solid #eee;
    background-color: #fafafa;
    flex-shrink: 0;
}

.ix-net-modal-footer button {
    padding: 12px 24px;
    font-size: 14px;
    min-width: 140px;
    cursor: pointer;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fff;
    transition: all 0.2s;
    font-weight: 600;
}

.ix-net-modal-footer button:hover {
    background-color: #f5f5f5;
}

.ix-net-modal-footer .button-primary {
    background-color: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

.ix-net-modal-footer .button-primary:hover {
    background-color: #005a87;
}

/* Responsive - aber nicht zu klein */
@media (max-width: 1200px) {
    .ix-net-modal-content {
        width: 98%;
        height: 90vh;
        max-height: 90vh;
    }
}

@media (max-width: 768px) {
    .ix-net-modal-content {
        width: 99%;
        height: 95vh;
        max-height: 95vh;
    }

    .ix-net-modal-header {
        padding: 15px;
    }

    .ix-net-modal-footer {
        flex-direction: column;
        padding: 15px;
    }

    .ix-net-modal-footer button {
        width: 100%;
    }
}

/* Scrollbar Styling */
.ix-net-modal-body::-webkit-scrollbar {
    width: 8px;
}

.ix-net-modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.ix-net-modal-body::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.ix-net-modal-body::-webkit-scrollbar-thumb:hover {
    background: #555;
}