/* ============================================================
   UNIVERSAL FILES HEADING (ADMIN + FRONTEND)
   ============================================================ */
.mfm-files-heading {
	display: block !important;
    font-size: 20px;
    line-height: 1.4;
    font-weight: 600;
    margin: 20px 0 10px;
}

/* ============================================================
   ACCORDION STYLING LAYOUT (ADMIN + FRONTEND)
   ============================================================ */
.mfm-accordion-item {
    padding: 8px 10px;
    background: #f1f1f1;
    cursor: pointer;
    margin-top: 4px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 6px;
}

.mfm-accordion-item .dashicons {
    transition: transform 0.2s ease;
}

.mfm-accordion-item.open .dashicons {
    transform: rotate(180deg);
}

.mfm-accordion-content {
    padding: 8px 16px;
    background: #fff;
    border-left: 2px solid #ddd;
}

.mfm-accordion-content {
    display: none;
}

.mfm-accordion-content.open {
    display: block;
}

/* Nested content must NOT collapse the parent */
.mfm-accordion-content .mfm-accordion-content {
    display: none;
}

.mfm-accordion-content .mfm-accordion-content.open {
    display: block;
}

/* ============================================================
   FILE LIST ROW LAYOUT (RESTORES ORIGINAL BEHAVIOR)
   ============================================================ */
.mfm-file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 4px;
    border-bottom: 1px solid #ddd;
}

/* Filename expands left */
.mfm-file-name {
    flex: 1 1 auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

/* Version sits just before buttons */
.mfm-file-version {
    flex: 0 0 auto;
    margin-right: 10px;
    white-space: nowrap;
    color: #555;
    font-size: 13px;
}

/* Buttons aligned right */
.mfm-file-actions {
    flex: 0 0 auto;
    display: flex;
    gap: 6px;
}

/* ============================================================
   UNIVERSAL MFM TABLE
   ============================================================ */
.mfm-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    background: #fff;
}

.mfm-table th,
.mfm-table td {
    padding: 8px 10px;
    vertical-align: middle;
}

.mfm-table th {
    width: 220px;
    text-align: left;
    font-weight: 600;
}

/* Light row striping */
.mfm-table tr:nth-child(even) {
    background: #f7f7f7;
}

/* ============================================================
   MISSING FIELD HIGHLIGHT
   ============================================================ */
.mfm-missing-field {
    background: #ffecec !important;
	border-left: 4px solid #d00;
}

.mfm-missing-field th label,
.mfm-missing-field td {
    color: #b30000;
    font-weight: 600;
}

/* ============================================================
   SELECT + INPUT FIELDS
   ============================================================ */
.mfm-table select,
.mfm-table input[type="text"] {
    width: 100%;
    max-width: 350px;
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
    background: #fff;
    font-size: 14px;
}

.mfm-table select:focus,
.mfm-table input[type="text"]:focus {
    border-color: #2271b1;
    outline: none;
}

/* ============================================================
   FRONTEND BUTTON
   ============================================================ */
.mfm-btn {
    display: inline-block;
    padding: 8px 16px;
    background: #2271b1;
    color: #fff;
    border-radius: 3px;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.mfm-btn:hover {
    background: #1a5a8a;
}

/* ============================================================
   FRONTEND WRAPPER
   ============================================================ */
.mfm-frontend {
    background: #fff;
    padding: 20px;
    border: 1px solid #ddd;
}

.mfm-category-select select,
.mfm-category-select select.form-control  {
    padding: 0 !important;
    height: 30px !important;
    line-height: 30px !important;
	margin-bottom: 20px;
}

.mfm-category-select select {
    width: 250px;
	height: 30px !important;

}

/* ============================================================
   NOTICE BOXES (FRONTEND)
   ============================================================ */
.mfm-success {
    background: #e6f7e6;
    border-left: 4px solid #2e8b57;
    padding: 10px 12px;
    margin-bottom: 15px;
}

.mfm-error {
    background: #ffecec;
    border-left: 4px solid #cc0000;
    padding: 10px 12px;
    margin-bottom: 15px;
}

/* ============================================================
   ADMIN DIALOG WRAPPER
   ============================================================ */
.mfm-admin-dialog {
    background: #fff;
    padding: 20px;
    border: 1px solid #ccd0d4;
    margin-top: 20px;
}

.mfm-admin-dialog h2 {
    margin-top: 0;
}

/* ============================================================
   FILE INPUT
   ============================================================ */
.mfm-admin-dialog input[type="file"],
.mfm-frontend input[type="file"] {
    margin-top: 5px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 600px) {
    .mfm-table th {
        width: auto;
        display: block;
        margin-bottom: 5px;
    }

    .mfm-table td {
        display: block;
        margin-bottom: 15px;
    }
}
/* ============================================================
   REQUIRED FIELD INDICATOR
   ============================================================ */
.mfm-required-asterisk {
    color: #d00;
    font-weight: bold;
    margin-left: 4px;
}

.mfm-required-row th label::after {
    content: " *";
    color: #d00;
    font-weight: bold;
}

.mfm-section-header {
    background: #f0f0f0;
}

.mfm-system-row {
    background: #fafafa;
}

/* FRONTEND HELP TEXT */
.mfm-help-text {
    margin: 4px 0 0;
    font-size: 13px;
    color: #555;
}

/* ==========================================
   Field Alignment for Public search form
   ========================================== *
/* Pagination buttons */
.mfm-pagination {
    margin: 20px 0;
    text-align: center;
}

.mfm-row {
    display: flex;
    gap: 20px;
    margin-bottom: 10px;
}

.mfm-col {
    flex: 1;
}

.mfm-col select,
.mfm-col input[type="text"] {
    width: 100%;
}

/* Increase height of Document Type multi-select */
.mfm-col select[name="mfm_type[]"] {
    height: 122px;   /* adjust to taste */
}

/* =====================================
   Search member page pagination
   ===================================== */
/* Public Search Pagination */
.mfm-pagination {
    margin: 20px 0;
    text-align: right;   /* RIGHT ALIGN */
}

.mfm-pages {
    display: inline-block; /* keeps buttons grouped */
}

.mfm-page-btn {
    display: inline-block;
    padding: 6px 12px;
    margin: 0 3px;
    background: #f0f0f0;
    border: 1px solid #ccc;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
}

.mfm-page-btn:hover {
    background: #e2e2e2;
}

.mfm-page-btn.mfm-current {
    background: #0073aa;
    border-color: #0073aa;
    color: #fff;
    cursor: default;
}

