/* Extra Info Modal */
.extra-info-modal-class {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width of the screen */
    height: 100%; /* Full height of the screen */
    display: none; /* Flexbox for centering the content */
    justify-content: center; /* Center horizontally */
    align-items: center; /* Center vertically */
    background-color: rgba(0, 0, 0, 0.5); /* Black background with opacity */
}

/* Modal content - grows as needed */
/* Modal content adjustments */
.extra-info-modal-content {
    background-color: #fefefe;
    width: auto;
    height: auto;
    max-height: 90%;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    overflow-x: auto;
    overflow-y: auto;
}

/* Ensure json-editor grows dynamically */
#json-editor {
    display: block;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 20px;
}

/* Key-value row */
.key-value {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

/* Input and select fields */
.key-input {
    width: 100px;
    padding: 5px;
    margin-right: 10px;
}

.value-input {
    width: 200px;
    padding: 5px;
    margin-right: 10px;
}

.value-type {
    margin-right: 10px;
}

/* Button styles inside key-value rows */
.key-value button {
    padding: 5px;
    background-color: #4CAF50;
    color: white;
    border: none;
    cursor: pointer;
    margin-right: 10px;
    border-radius: 4px;
}

.key-value button:hover {
    background-color: #45a049;
}

/* Button styles for modal controls */
#extraInfoModal .modal-content > button {
    margin: 10px 0;
    padding: 5px 10px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#extraInfoModal .modal-content > button:hover {
    background-color: #45a049;
}

/* Generated JSON area */
.result {
    background-color: #f4f4f4;
    padding: 10px;
    border: 1px solid #ddd;
    min-height: 100px;
    margin-top: 20px;
    white-space: pre-wrap;
    overflow-x: auto;
}

.button-container {
    display: flex;
    justify-content: center;
    gap: 10px; /* Adds space between the buttons */
    margin-top: 20px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .key-input, .value-input {
        width: 100px;
    }

    button {
        padding: 5px;
        margin-right: 5px;
    }
}

/* Other modal styles for close button */
.closeExtraInfo {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.closeExtraInfo:hover,
.closeExtraInfo:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* Overlay and Spinner Styles */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none; /* Hidden by default */
    z-index: 1000; /* On top of everything */
}
.spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border: 8px solid rgba(255, 255, 255, 0.3);
    border-top: 8px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}