.wmr-admin-wrap {
    max-width: 1200px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #3c434a;
}

.wmr-dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 1024px) {
    .wmr-dashboard-grid {
        grid-template-columns: 2fr 1fr;
    }
}

.wmr-card {
    background: #fff;
    border: 1px solid #dcdde1;
    box-shadow: 0 2px 4px rgba(0,0,0,.03);
    padding: 24px;
    border-radius: 8px;
}

.wmr-card-title {
    margin-top: 0;
    border-bottom: 1px solid #f0f0f1;
    padding-bottom: 12px;
    font-size: 1.25rem;
    color: #1d2327;
}

.wmr-description {
    font-size: 0.9em;
    color: #646970;
    margin-bottom: 15px;
}

.wmr-text-input {
    border: 1px solid #8c8f94;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 14px;
    line-height: 2;
    transition: border-color 0.15s ease-in-out;
}
.wmr-text-input:focus {
    border-color: #2271b1;
    outline: none;
    box-shadow: 0 0 0 1px #2271b1;
}

/* Stats */
.wmr-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 20px;
}

.wmr-stat-item label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
}

.wmr-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wmr-stat-input {
    width: 100%;
    text-align: center;
}

/* Story */
.wmr-story-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.wmr-reporter-label {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wmr-action-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wmr-button {
    background: #2271b1;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.wmr-button:hover { background: #135e96; }

/* Runs */
.wmr-runs-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

@media (min-width: 768px) {
    .wmr-runs-container {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }
}

.wmr-chair-title {
    margin-top: 0;
    background: #f6f7f7;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 1.1rem;
}

.wmr-chair-name {
    font-weight: normal;
    color: #646970;
}

.wmr-run-row {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f1;
}
.wmr-run-row:last-child { border-bottom: none; }

.wmr-run-icon { flex: 0 0 35px; }
.wmr-run-name {
    flex: 1;
    font-weight: 500;
    font-size: 14px;
}

.wmr-run-toggles {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wmr-toggle-label {
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* SVG Status Icons */
.wmr-status-icon {
    width: 20px;
    height: 20px;
    display: inline-flex;
    opacity: 0;
    transition: opacity 0.3s ease;
    align-items: center;
    justify-content: center;
}
.wmr-status-icon.show { opacity: 1; }

.icon-spin { animation: spin 1s linear infinite; color: #2271b1; }
.icon-success { color: #00a32a; }
.icon-error { color: #d63638; }

@keyframes spin { 100% { transform: rotate(360deg); } }

/* 1. Make the Story card a Flex column */
.wmr-card:first-of-type {
    display: flex;
    flex-direction: column;
    min-height: 600px; /* Adjust this to dictate the total height of the card */
}

/* 2. Make the native WordPress wrappers flex to fill the card */
.wp-editor-wrap,
.wp-editor-container {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* 3. STRICTLY target only the outermost TinyMCE containers */
.wp-editor-container > .mce-tinymce,
.wp-editor-container > .mce-tinymce > .mce-container-body {
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important;
    height: 100% !important;
}

/* 4. Ensure the toolbars do NOT stretch */
.wp-editor-container .mce-top-part {
    flex-shrink: 0 !important;
}

/* 5. Force the wrapper holding the text area to take all remaining space */
.wp-editor-container .mce-edit-area {
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important;
}

/* 6. Force the iframe (Visual mode) and textarea (Text mode) to fill that wrapper */
.wp-editor-container .mce-edit-area iframe,
.wp-editor-container .wp-editor-area {
    flex-grow: 1 !important;
    height: 100% !important;
    min-height: 250px !important;
}