/* General form container */
.mdm-diploma-form-wrapper {
    max-width: 700px;
    margin: 30px auto;
    padding: 30px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #333;
}

/* Form title */
.mdm-form-title {
    text-align: center;
    color: #222;
    margin-bottom: 25px;
    font-size: 2em;
    font-weight: 600;
}

/* Form rows for better spacing */
.mdm-form-row {
    margin-bottom: 20px;
}

.mdm-form-row:last-of-type {
    margin-bottom: 0;
}

/* Labels */
.mdm-form-row label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
    font-size: 0.95em;
}

/* Input fields and select */
.mdm-input-field,
.mdm-select-field,
.mdm-input-image-url { /* mdm-input-image-url is hidden, but targeting for consistency */
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
    box-sizing: border-box; /* Include padding in width */
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    -webkit-appearance: none; /* Remove default styling for selects on some browsers */
    -moz-appearance: none;
    appearance: none;
}

.mdm-input-field:focus,
.mdm-select-field:focus,
.mdm-upload-image-button:focus,
.mdm-submit-button:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
    outline: none;
}

/* Select arrow styling (optional, for custom arrow) */
.mdm-select-field {
    background-image: url('data:image/svg+xml;utf8,<svg fill="#000000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/><path d="M0 0h24v24H0z" fill="none"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    padding-right: 35px; /* Make space for the custom arrow */
}

/* Buttons */
.mdm-upload-image-button,
.mdm-remove-image-button,
.mdm-submit-button {
    display: inline-block;
    padding: 10px 20px;
    font-size: 1em;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    border: none;
    border-radius: 5px;
    transition: background-color 0.2s ease-in-out;
}

.mdm-upload-image-button,
.mdm-remove-image-button {
    background-color: #f3f4f6;
    color: #333;
    border: 1px solid #ccc;
    margin-top: 5px;
    font-size: 0.9em;
    padding: 8px 15px;
}

.mdm-upload-image-button:hover,
.mdm-remove-image-button:hover {
    background-color: #e0e0e0;
    border-color: #b0b0b0;
}

.mdm-submit-button {
    background-color: #0073aa;
    color: #fff;
    width: 100%;
    margin-top: 20px;
    padding: 15px 20px;
    font-size: 1.1em;
    font-weight: 600;
}

.mdm-submit-button:hover {
    background-color: #005a87;
}

/* Image upload specific styling */
.mdm-image-upload-wrapper {
    margin-top: 5px;
}

.mdm-image-preview {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap; /* Allow wrapping if many images, though currently single */
}

.mdm-preview-image {
    border: 1px solid #eee;
    padding: 3px;
    background-color: #f9f9f9;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    max-width: 120px; /* Slightly larger preview */
    height: auto;
    border-radius: 4px;
}

/* Message display */
.mdm-message {
    padding: 15px;
    margin-top: 20px;
    border-radius: 5px;
    font-size: 1em;
    text-align: center;
}

.mdm-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.mdm-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Diploma output area */
.mdm-diploma-output {
    margin-top: 30px;
    text-align: center;
    border-top: 1px solid #eee;
    padding-top: 30px;
}

.mdm-diploma-output img {
    max-width: 100%;
    height: auto;
    border: 1px solid #ddd;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}
