/* dmuk-cpp-style.css */

.dmuk-cpp-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px; /* added padding to avoid edge collisions */
}

.dmuk-cpp-modal {
    background: white;
    padding: 20px;
    width: 100%;
    max-width: 500px; /* ensures modal doesn't get too wide */
    border-radius: 5px;
    text-align: center;
    box-sizing: border-box; /* ensures padding doesn't break layout */
    word-wrap: break-word; /* prevents text overflow */
    overflow-wrap: break-word; /* ensures long words wrap within container */
}

.dmuk-cpp-modal h2 {
    font-size: 1.5em;
    margin-bottom: 15px;
}

.dmuk-cpp-modal p {
    font-size: 1em;
    margin-bottom: 10px;
    line-height: 1.4; /* improves readability */
}

.dmuk-cpp-button-group {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    gap: 10px; /* added gap for better spacing */
}

.dmuk-cpp-cancel-button {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 5px 15px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.9em;
    min-width: 100px; /* Ensures a reasonable tap target */
}

.dmuk-cpp-cancel-button:hover {
    background-color: #c0392b;
}

.dmuk-cpp-copy-button {
    background-color: #0073aa;
    color: white;
    border: none;
    padding: 5px 15px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.9em;
    min-width: 100px; /* Ensures a reasonable tap target */
}

.dmuk-cpp-copy-button:hover {
    background-color: #005a87;
}

@media screen and (max-width: 600px) {
    .dmuk-cpp-modal {
        max-width: 90%;
        padding: 15px;
    }

    .dmuk-cpp-modal h2 {
        font-size: 1.2em;
    }

    .dmuk-cpp-modal p {
        font-size: 0.9em;
    }

    .dmuk-cpp-button-group {
        flex-direction: column;
        gap: 10px;
    }

    .dmuk-cpp-copy-button, .dmuk-cpp-cancel-button {
        width: 100%; /* Make buttons full width on mobile */
        min-width: unset; /* Removes min-width constraint on small screens */
    }
}
