/* --- General Container & Search --- */
#cdp-search {
    display: block;
    margin: 10px auto 20px auto; /* Increased bottom margin */
    padding: 10px;
    width: 100%;
    max-width: 500px;
    text-align: center;
    border: 2px solid #000;
    border-radius: 4px;
}

/* --- Table Styles --- */
.cdp-table-wrapper {
    width: 100%;
    overflow-x: auto;
    border: 2px solid #a0a0a0; /* MODIFICATION: Added 2px border to wrapper */
    border-radius: 5px;
}

#cdp-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

/* MODIFICATION: Table borders changed to 2px */
#cdp-table th, #cdp-table td {
    border: 2px solid #a0a0a0;
    padding: 10px;
    text-align: left;
}

#cdp-table th {
    background-color: #f2f2f2;
}

/* --- Modal Styles --- */
#cdp-modal {
    position: fixed;
    z-index: 999999;
    top: 0; left: 0;
    width: 100%; /* Changed from 100vw */
    height: 100%; /* Changed from 100vh */
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0; /* For fade-in effect */
    visibility: hidden; /* For fade-in effect */
    transition: opacity 0.3s, visibility 0.3s;
}

#cdp-modal.hidden {
    opacity: 0;
    visibility: hidden;
}

#cdp-modal:not(.hidden) {
    opacity: 1;
    visibility: visible;
}

.cdp-modal-content {
    background: white;
    padding: 25px; /* MODIFICATION: Increased padding */
    width: 90%;
    max-width: 450px;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 5px 20px rgba(0,0,0,0.4);
    border: 2px solid #0073aa; /* MODIFICATION: Added 2px blue border */
}

.cdp-close {
    position: absolute;
    right: 15px;
    top: 15px;
    font-weight: bold;
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
    color: #555;
}

.cdp-close:hover {
    color: #000;
}

/* --- Form Styles within Modal --- */
#cdp-message-form {
    display: flex;
    flex-direction: column;
}
#cdp-message-form h3 {
    margin-top: 0;
}
#cdp-message-form label {
    margin-top: 10px;
    margin-bottom: 5px;
    font-weight: bold;
}
#cdp-message-form input[type="text"],
#cdp-message-form input[type="email"],
#cdp-message-form textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-bottom: 10px; /* MODIFICATION: Added spacing */
}
#cdp-message-form button {
    margin-top: 15px;
}

.cdp-form-status {
    margin-top: 15px;
    text-align: center;
    font-weight: bold;
}
.cdp-form-status.success { color: green; }
.cdp-form-status.error { color: red; }


/* Prevent body scroll when modal is open */
body.cdp-modal-open {
    overflow: hidden;
}

/* --- Pagination Controls --- */
.cdp-pagination {
    text-align: center;
    margin: 20px 0;
}

.cdp-pagination button {
    background-color: #0073aa;
    color: white;
    border: none;
    padding: 8px 14px;
    margin: 0 3px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.cdp-pagination button:hover {
    background-color: #005177;
}

.cdp-pagination button.active {
    background-color: #003e5c;
}

.cdp-pagination button:disabled {
    background-color: #a0a5aa;
    cursor: not-allowed;
}
