.wp-certengine .certificate-result.valid {
    color: green;
    border-left: 4px solid green;
    padding-left: 12px;
    margin-bottom: 2em;
    font-weight: 500;
}

.wp-certengine .certificate-result.invalid {
    color: red;
    border-left: 4px solid red;
    padding-left: 12px;
    margin-bottom: 2em;
    font-weight: 500;
}

.wp-certengine .cert-input-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1em;
    margin-top: 1em;
    max-width: 700px;
}

.wp-certengine .cert-input-group .input-wrapper {
    flex: 2 1 300px; /* Grows more than the button */
    display: flex;
    flex-direction: column;
    min-width: 200px;
}

.wp-certengine .cert-input-group .button-wrapper {
    flex: 0 0 auto; /* Stay narrow */
    display: flex;
    flex-direction: column;
}

.wp-certengine .cert-input-group input[type="text"] {
    padding: 0.6em;
    font-size: 1rem;
    box-sizing: border-box;
    width: 100%;
}

.wp-certengine .cert-input-group button {
    padding: 0.6em 1.2em;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    color: white;
    border-radius: 4px;
}

/* -----------------------------------------------------------------------------
 * Styling for CertEngine course cards
 */

.certengine-course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.certengine-course-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1rem;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.certengine-course-header {
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
    color: #3f47cc;
    font-weight: bold;
}

.certengine-course-title {
    display: block;
    margin-top: 0.25rem;
    font-size: 1rem;
    color: #333;
    font-weight: 500;
}

.certengine-course-description {
    font-size: 0.9rem;
    margin-top: 0.5rem;
    color: #555;
    flex-grow: 1;
}

.certengine-course-actions {
    margin-top: 0.75rem;
    text-align: right;
}

.certengine-edit-link {
    font-size: 0.9rem;
    color: #3f47cc;
    text-decoration: none;
}

.certengine-edit-link:hover {
    text-decoration: underline;
}

.certengine-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.certengine-modal-content {
    background: #fff;
    border-radius: 8px;
    max-width: 500px;
    width: 100%;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.certengine-modal-content h3 {
    margin-top: 0;
}

.certengine-modal-content label {
    display: block;
    margin: 1rem 0 0.25rem;
}

.certengine-modal-content input,
.certengine-modal-content textarea {
    width: 100%;
    padding: 0.5rem;
    margin-bottom: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.certengine-modal-content button {
    margin-right: 1rem;
    padding: 0.5rem 1rem;
    border: none;
    background: var(--global-palette1);
    color: var(--global-palette9);
    border-radius: 4px;
    cursor: pointer;
}

.certengine-modal-content button#certengine-cancel-edit {
    background: var(--global-palette1);
}

.certengine-student-actions button {
    margin-right: 30px;
}

.certengine-add-course-button {
    margin-bottom: 20px;
    margin-right: 30px;
    padding: 10px 20px;
    color: var(--global-palette9);
    border: none;
    cursor: pointer;
}

.certengine-add-course-button:hover {
}


/* -----------------------------------------------------------------------------
 * Styling for CertEngine certificate cards
 */

.certengine-certificate-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.certengine-certificate-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1.2rem;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.certengine-certificate-header {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2c2f4a;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.certengine-certificate-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
}

.certengine-certificate-info {
    font-size: 0.95rem;
    color: #444;
}

.certengine-certificate-info span {
    display: block;
    font-weight: 500;
    color: #666;
    margin-bottom: 0.25rem;
}

.certengine-certificate-info strong {
    display: block;
    font-weight: 600;
    color: #111;
}

.certengine-certificate-footer {
    text-align: right;
    margin-top: auto;
}

.certengine-view-button {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    background: var(--global-palette1);
    color: white;
    border-radius: 4px;
    text-decoration: none;
}

.certengine-view-button:hover {
    color: white;
    background: var(--global-palette2);
}

