/* -------------------------------------------------------------------------
   Layout: full-bleed header, constrained content (1280px), optional full-bleed rows
------------------------------------------------------------------------- */

/* --- Header ------------------------------------------------------------ */

/* Header rows: no horizontal padding — the header background spans the full viewport.
   Each row's inner content handles its own width constraint below. */
.wp-block-kadence-header-row {
    margin-top: 0;
    margin-bottom: 0;
    padding-left: 0;
    padding-right: 0;
}

/* Logo / top row: override Kadence's max-width so content fills the full header width */
.wp-block-kadence-header-desktop .wp-block-kadence-header-row-top .kadence-header-row-inner,
.wp-block-kadence-header-desktop .wp-block-kadence-header-row-center .kadence-header-row-inner {
    max-width: none;
    width: 100%;
    padding-left: 2rem;
    padding-right: 2rem;
    box-sizing: border-box;
}

/* Nav / bottom row: the Kadence nav block's inner .kb-theme-content-width wrapper
   constrains the menu links to --global-content-width (1280px) and centres them.
   No additional padding needed here. */

.wp-block-kadence-identity {
    padding-top: 0.5em;
    padding-bottom: 0.5em;
}

/* --- Content containers ----------------------------------------------- */

/* All pages: content container padded and capped at 1280px content width */
#inner-wrap .site-container {
    padding-left: 4em;
    padding-right: 4em;
    max-width: calc(1280px + 8em);
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

/* Footer padding (background is full-bleed; padding constrains inner content) */
.site-footer {
    padding-left: 4em;
    padding-right: 4em;
}

/* Responsive padding — reduce side padding on tablet and mobile */
@media (max-width: 1024px) {

    #inner-wrap .site-container,
    .site-footer {
        padding-left: 2em;
        padding-right: 2em;
    }
}

@media (max-width: 680px) {

    #inner-wrap .site-container,
    .site-footer {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* --- Optional full-bleed rows ----------------------------------------- */

/* Add the CSS class "mrlm-full-bleed" to a Kadence Row Layout block (via
   Advanced → Additional CSS Class) to break it out of the content container
   and span the full browser width. Works on both home and inner pages.
   Requires overflow-x: hidden on the page (Kadence sets this by default). */
.kb-row-layout-wrap.mrlm-full-bleed {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    max-width: none;
}

.kadence-breadcrumbs {
    padding: 1em 0 0;
}


/* -------------------------------------------------------------------------
   Unit Report Status Badge (shown in heading when not Published)
------------------------------------------------------------------------- */

.mrlm-report-status {
    font-size: 0.6em;
    font-weight: 600;
    text-transform: uppercase;
    color: #b45309;
    vertical-align: middle;
}

/* -------------------------------------------------------------------------
   Unit Report Upload Form
------------------------------------------------------------------------- */

.mrlm-upload-zone {
    border: 2px dashed #aaa;
    border-radius: 6px;
    padding: 2rem;
    margin: 1.5rem 0;
    text-align: center;
    transition: border-color 0.2s, background 0.2s;
}

.mrlm-upload-zone:hover,
.mrlm-upload-zone--hover {
    border-color: #0073aa;
    background: #f0f8ff;
}

.mrlm-upload-zone--selected {
    border-color: #46b450;
    background: #f0fff0;
}

.mrlm-upload-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.mrlm-upload-label {
    display: block;
    cursor: pointer;
}

.mrlm-upload-icon {
    display: block;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.mrlm-upload-filename {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.9em;
    color: #46b450;
    font-weight: 600;
}

.mrlm-editor-wrap {
    margin-bottom: 1.5rem;
}

.mrlm-form-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-top: 1.5rem;
}

.mrlm-cancel-link {
    color: #666;
    text-decoration: underline;
}

/* -------------------------------------------------------------------------
   Pending Reports List
------------------------------------------------------------------------- */

.mrlm-pending-report-list li {
    margin-bottom: 0.25rem;
}

.mrlm-upload-prompt-table {
    border: none;
    border-collapse: collapse;
    margin-bottom: 1rem;
    width: 100%;
}

.mrlm-upload-prompt-table td {
    border: none;
    padding: 0.25rem 1rem 0.25rem 0;
    vertical-align: middle;
}

.mrlm-upload-prompt-table th {
    border: none;
    padding: 1rem 0 0.25rem;
    text-align: left;
    font-weight: normal;
    font-size: 0.95em;
}

.mrlm-upload-prompt-table td:last-child {
    text-align: right;
    padding-right: 0;
    white-space: nowrap;
}

.mrlm-upload-prompt-table th[colspan] {
    text-align: left;
}

.mrlm-table-section-heading {
    text-align: left;
    font-weight: bold;
}

/* -------------------------------------------------------------------------
   App Store Button Glow (footer)
------------------------------------------------------------------------- */

.btn_glow {
    display: inline-block;
    transition: filter 0.2s ease, transform 0.2s ease;
}

.btn_glow:hover {
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.9)) drop-shadow(0 0 16px rgba(255, 255, 255, 0.5));
    transform: scale(1.03);
}

/* -------------------------------------------------------------------------
   Fundraising Events List [mrlm_fundraising_events]
------------------------------------------------------------------------- */

.mrlm-fundraising-events {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mrlm-fundraising-event {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.mrlm-fundraising-event:last-child {
    border-bottom: none;
}

.mrlm-fundraising-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 3.5rem;
    background: #0e4d7a;
    color: #fff;
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    flex-shrink: 0;
    line-height: 1;
}

.mrlm-fundraising-day {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.mrlm-fundraising-month {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 0.25rem;
}

.mrlm-fundraising-details {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.mrlm-fundraising-place {
    font-size: 1rem;
}

.mrlm-fundraising-time {
    font-size: 0.875rem;
    color: #6b7280;
}

.mrlm-fundraising-types {
    font-size: 0.875rem;
    color: #6b7280;
}

/* -------------------------------------------------------------------------
   Training Sessions List [mrlm_training_sessions] / [mrlm_all_training_sessions]
------------------------------------------------------------------------- */

.mrlm-training-sessions {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mrlm-training-session {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto auto;
    column-gap: 1.25rem;
    align-items: center;
    padding: 0.85rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.mrlm-training-session:last-child {
    border-bottom: none;
}

/* Date tile — matches fundraising events style */
.mrlm-session-date-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 3.5rem;
    background: #0e4d7a;
    color: #fff;
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    flex-shrink: 0;
    line-height: 1;
}

.mrlm-session-day {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.mrlm-session-month {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 0.25rem;
}

/* Info column */
.mrlm-session-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.mrlm-session-course {
    font-weight: 600;
}

.mrlm-session-time {
    font-size: 0.95rem;
}

.mrlm-session-location {
    font-size: 0.875rem;
    color: #6b7280;
}

/* Actions column — right side of session row */
.mrlm-session-actions {
    align-self: center;
    justify-self: end;
}

/* Get Tickets button */
.mrlm-get-tickets-btn {
    background-color: #b22222;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 0.65rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    min-width: 10rem;
    text-align: center;
}

.mrlm-get-tickets-btn:hover,
.mrlm-get-tickets-btn:focus {
    background-color: #8b0000;
    outline: 2px solid #8b0000;
    outline-offset: 2px;
}

.mrlm-get-tickets-btn--open {
    min-width: 0;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    font-size: 1.1rem;
    line-height: 1;
    border-radius: 4px;
}

/* Payment form — spans all columns on the second grid row */
.mrlm-session-payment-form {
    grid-column: 1 / -1;
    padding-top: 1rem;
    overflow: hidden;
}

/* Constrain the GiveNow iframe to its content height.
   GiveNow's embed sets a large fixed height; our postMessage listener
   will correct it. The max-height here prevents the blank space showing
   while we wait for that first resize message. Adjust if content gets clipped. */
.mrlm-session-payment-form iframe {
    display: block;
    width: 100%;
    max-height: 600px;
}

/* Tickets available soon — in the actions column */
.mrlm-session-tickets-soon {
    font-size: 0.875rem;
    color: #6b7280;
    font-style: italic;
}

/* -------------------------------------------------------------------------
   Training Session Details Table [mrlm_training_course_session_viewer]
------------------------------------------------------------------------- */

.mrlm-session-course-heading {
    margin-bottom: 1rem;
}

.mrlm-session-details-table {
    border-collapse: collapse;
    width: 100%;
    max-width: 560px;
    margin-bottom: 2rem;
}

.mrlm-session-details-table th,
.mrlm-session-details-table td {
    padding: 0.5rem 1rem 0.5rem 0;
    vertical-align: top;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
}

.mrlm-session-details-table th {
    font-weight: 600;
    white-space: nowrap;
    width: 6rem;
    color: #374151;
}

.mrlm-session-details-table tr:last-child th,
.mrlm-session-details-table tr:last-child td {
    border-bottom: none;
}

.mrlm-session-section.mrlm-session-payment {
    margin-top: 1.5rem;
}

/* -------------------------------------------------------------------------
   Training Course Viewer — two-column layout (main content + sidebar)
------------------------------------------------------------------------- */

.mrlm-course-layout {
    display: flex;
    gap: 2.5rem;
    align-items: flex-start;
}

.mrlm-course-main {
    flex: 1 1 0;
    min-width: 0;
}

.mrlm-course-sidebar {
    flex: 0 0 220px;
}

.mrlm-course-sidebar h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.mrlm-course-sidebar .mrlm-other-courses ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mrlm-course-sidebar .mrlm-other-courses li {
    margin-bottom: 0.5rem;
}

@media (max-width: 680px) {
    .mrlm-course-layout {
        flex-direction: column;
    }

    .mrlm-course-sidebar {
        width: 100%;
    }
}

/* -------------------------------------------------------------------------
   Location Viewer [mrlm_location_viewer]
------------------------------------------------------------------------- */

.mrlm-location-viewer {
    max-width: 960px;
}

/* Featured image */
.mrlm-location-hero {
    margin-bottom: 1.5rem;
}

.mrlm-location-hero-img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

.mrlm-location-name {
    margin-bottom: 1rem;
}

/* Two-column body */
.mrlm-location-body--has-map {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.mrlm-location-content {
    flex: 1 1 0;
    min-width: 0;
}

.mrlm-location-address {
    color: #6b7280;
    margin-bottom: 1.25rem;
}

.mrlm-location-directions h3 {
    margin-bottom: 0.5rem;
}

/* Map box */
.mrlm-location-map-box {
    flex: 0 0 500px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.mrlm-location-map {
    width: 100%;
    height: 500px;
    display: block;
}

.mrlm-location-directions-wrap {
    padding: 0.75rem;
    text-align: center;
}

.mrlm-location-directions-btn {
    display: inline-block;
    padding: 0.6rem 1.25rem;
    background: #0e4d7a;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 6px;
    transition: background 0.15s;
}

.mrlm-location-directions-btn:hover {
    background: #0a3a5c;
    color: #fff;
}

@media (max-width: 680px) {
    .mrlm-location-body--has-map {
        flex-direction: column;
    }

    .mrlm-location-map-box {
        flex: none;
        width: 100%;
    }
}

/* -------------------------------------------------------------------------
   Red Callout Box — apply via Additional CSS Class on a Paragraph block
------------------------------------------------------------------------- */

.mrlm-red-box {
    background-color: #c0392b;
    color: #fff;
    border-radius: 6px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
}

.mrlm-red-box a {
    color: #fff;
    text-decoration: underline;
}

/* -------------------------------------------------------------------------
   Sponsors [mrlm_sponsors]
------------------------------------------------------------------------- */

.mrlm-sponsors {
    margin: 1.5rem 0;
}

.mrlm-sponsor-level {
    margin-bottom: 2.5rem;
}

.mrlm-sponsor-level-heading {
    text-align: center;
    margin-bottom: 1.25rem;
    font-size: 2em;
    padding: 0.4em 1.5em;
    border-radius: 6px;
    color: #fff;
}

.mrlm-sponsor-logos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1.5rem 2rem;
}

.mrlm-sponsor-logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.mrlm-sponsor-logo-img {
    display: block;
    height: auto;
    transition: opacity 0.15s;
}

.mrlm-sponsor-logo a:hover .mrlm-sponsor-logo-img {
    opacity: 0.8;
}

/* Small variant [mrlm_sponsors size="small"] — home page use */
.mrlm-sponsors--small .mrlm-sponsor-level {
    margin-bottom: 1.25rem;
}

.mrlm-sponsors--small .mrlm-sponsor-level-heading {
    font-size: 1em;
    background: none;
    padding: 0;
    border-radius: 0;
    font-weight: 700;
    margin-bottom: 0.6rem;
}

.mrlm-sponsors--small .mrlm-sponsor-logos {
    gap: 0.75rem 1rem;
}
/* -------------------------------------------------------------------------
   Unit Reports month selector [mrlm_list_unit_reports_with_select]
------------------------------------------------------------------------- */

/* Heading and select sit side-by-side; select is outside the <h3> to prevent
   the first list bullet rendering next to the dropdown arrow */
.mrlm-ur-heading {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.25em 0.5em;
    margin-bottom: 0.5rem;
}

.mrlm-ur-heading-text {
    margin: 0;
}

.mrlm-ur-month-select {
    font-size: inherit;
    font-weight: bold;
}

.mrlm-ur-report-list {
    font-size: 1.1rem;
    margin-top: 0.25rem;
}

.mrlm-ur-report-list li {
    padding: 0.4rem 0;
}

.mrlm-unit-report-nav {
    margin-top: 1rem;
}

.mrlm-ur-nav-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.mrlm-ur-nav-select {
    width: 100%;
    font-size: 1rem;
    padding: 0.4rem 0.5rem;
}

/* -------------------------------------------------------------------------
   Member Profile Forms [mrlm_forgot_password] [mrlm_reset_password] [mrlm_edit_profile]
------------------------------------------------------------------------- */

.mrlm-profile-form {
    max-width: 480px;
}

.mrlm-profile-form .mrlm-form-row {
    margin-bottom: 1rem;
}

.mrlm-profile-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.mrlm-profile-form input[type="text"],
.mrlm-profile-form input[type="email"],
.mrlm-profile-form input[type="password"],
.mrlm-profile-form input[type="tel"] {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

.mrlm-profile-form .mrlm-form-section {
    border-top: 1px solid #e0e0e0;
    margin-top: 1.5rem;
    padding-top: 1rem;
}

.mrlm-profile-form .mrlm-form-section:first-of-type {
    border-top: none;
    margin-top: 0;
    padding-top: 0;
}

.mrlm-profile-form .mrlm-form-section h3 {
    margin-top: 0;
    margin-bottom: 1rem;
}

.mrlm-profile-avatar-preview {
    margin-bottom: 0.75rem;
}

.mrlm-profile-avatar-preview img {
    border-radius: 50%;
    width: 80px;
    height: 80px;
    object-fit: cover;
    display: block;
}

.mrlm-profile-notice {
    padding: 0.75rem 1rem;
    border-radius: 4px;
    margin-bottom: 1.25rem;
}

.mrlm-profile-notice--success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.mrlm-profile-notice--error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* -------------------------------------------------------------------------
   Member Directory [mrlm_member_directory]
------------------------------------------------------------------------- */

.mrlm-member-directory-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.mrlm-member-directory table.dataTable tbody tr.odd > * {
    background-color: #fff;
}

.mrlm-member-directory table.dataTable tbody tr.even > * {
    background-color: #e6f2f8;
}

/* -------------------------------------------------------------------------
   Docs Section Index [mrlm_docs_section_index]
------------------------------------------------------------------------- */

.mrlm-docs-index,
.mrlm-docs-index-sub {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.mrlm-docs-index-sub {
    padding-left: 1.25rem;
    margin-top: 0.25rem;
}

.mrlm-docs-index li,
.mrlm-docs-index-sub li {
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.mrlm-docs-index-sub li {
    margin-bottom: 0.25rem;
}

.mrlm-docs-section > a {
    font-size: 1.15em;
    font-weight: 600;
}

.mrlm-docs-article > a {
    font-size: 1em;
}

/* -------------------------------------------------------------------------
   TablePress DataTables enhancements
------------------------------------------------------------------------- */

/* Invisible placeholder that marks the wrapper's original DOM position */
.mrlm-table-sentinel {
    display: none;
}

/* Controls bar: expand button + column filter dropdowns */
.mrlm-table-controls {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    margin-bottom: 0.75rem;
}

/* Full-page expand/close button */
.mrlm-table-expand-btn {
    padding: 0.3rem 0.85rem;
    font-size: 0.85rem;
    line-height: 1.4;
    background: #0e4d7a;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}

.mrlm-table-expand-btn:hover {
    background: #0a3a5c;
    color: #fff;
}

/* Filter dropdowns row */
.mrlm-col-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.4rem 0.75rem;
}

.mrlm-col-filter {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mrlm-col-filter span {
    font-size: 0.75rem;
    font-weight: 600;
    color: #374151;
    white-space: nowrap;
}

.mrlm-col-filter select {
    font-size: 0.85rem;
    padding: 0.2rem 0.4rem;
    border: 1px solid #d1d5db;
    border-radius: 3px;
    background: #fff;
    max-width: 140px;
}

/* Full-page overlay — appended to <body> to escape any parent CSS transform */
.mrlm-table-overlay {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 9999;
    background: #fff;
    overflow: auto;
    padding: 1rem 1.5rem;
    box-sizing: border-box;
}

/* Push overlay below the WP admin bar when it is present */
body.admin-bar .mrlm-table-overlay {
    top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar .mrlm-table-overlay {
        top: 46px;
    }
}

.mrlm-table-overlay.is-open {
    display: block;
}

body.mrlm-table-fullpage-active {
    overflow: hidden;
}

/* -------------------------------------------------------------------------
   Training Video Grid [mrlm_member_training_video_grid]
------------------------------------------------------------------------- */

/* Ensure Magnific Popup hidden elements stay hidden if its CSS isn't loaded */
.mfp-hide {
    display: none !important;
}

/* Video popup layout — replicated from Kadence block CSS so it works
   even when no kadence/videopopup block is present on the page */
.mrlm-video-card .kadence-video-intrinsic {
    position: relative;
    overflow: hidden;
    display: block;
}

.mrlm-video-card .kadence-video-poster {
    display: block;
    width: 100%;
    height: auto;
}

.mrlm-video-card .kadence-video-overlay {
    position: absolute;
    inset: 0;
}

.mrlm-video-card .mrlm-video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    z-index: 1;
    line-height: 0;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.mrlm-video-card .mrlm-video-play-btn:hover {
    transform: translate(-50%, -50%) scale(1.1);
    opacity: 0.9;
}

/* -------------------------------------------------------------------------
   Video overlay modal
------------------------------------------------------------------------- */

#mrlm-video-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.85);
    align-items: center;
    justify-content: center;
}

#mrlm-video-overlay.mrlm-video-overlay--open {
    display: flex;
}

body.mrlm-video-overlay-active {
    overflow: hidden;
}

#mrlm-video-overlay-content {
    position: relative;
    width: 90vw;
    max-width: 1080px;
}

#mrlm-video-overlay-close {
    position: absolute;
    top: -2.5rem;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
}

#mrlm-video-overlay-inner video,
#mrlm-video-overlay-inner iframe {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    background: #000;
}

body.admin-bar #mrlm-video-overlay {
    top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar #mrlm-video-overlay {
        top: 46px;
    }
}

.mrlm-video-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.mrlm-video-card h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.mrlm-video-card-desc {
    margin-top: 0.75rem;
    font-size: 0.9em;
}

.mrlm-video-card-desc p:last-child {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .mrlm-video-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .mrlm-video-grid {
        grid-template-columns: 1fr;
    }
}

/* -------------------------------------------------------------------------
   WillyWeather warning bar — smooth layout shift
   JS detects the bar, sets body padding-top + #wpadminbar top via inline
   style.  Transitions here animate the slide when the bar appears/closes.
------------------------------------------------------------------------- */

body {
    transition: padding-top 0.3s ease;
}

#wpadminbar {
    transition: top 0.3s ease;
}

/* -------------------------------------------------------------------------
   Analytics Dashboard [mrlm_analytics_dashboard]
------------------------------------------------------------------------- */

.mrlm-analytics-dashboard {
    font-family: inherit;
    max-width: 1100px;
}

.mrlm-analytics-section-heading {
    margin: 2rem 0 1rem;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 2px solid #0e4d7a;
    padding-bottom: 0.4rem;
    color: #0e4d7a;
}

.mrlm-analytics-period {
    color: #6b7280;
    font-size: 0.9rem;
    margin: 0 0 1.5rem;
}

.mrlm-analytics-no-data {
    color: #9ca3af;
    font-style: italic;
    font-size: 0.9rem;
}

/* Date range nav */
.mrlm-analytics-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.mrlm-analytics-nav-btn {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #374151;
    text-decoration: none;
    background: #fff;
    transition: background 0.15s, border-color 0.15s;
}

.mrlm-analytics-nav-btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
    color: #111827;
}

.mrlm-analytics-nav-active {
    background: #0e4d7a;
    border-color: #0e4d7a;
    color: #fff;
    font-weight: 600;
}

.mrlm-analytics-nav-active:hover {
    background: #0a3a5c;
    border-color: #0a3a5c;
    color: #fff;
}

/* Unified tile grid — KPI + chart tiles */
.mrlm-analytics-tile-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.mrlm-analytics-tile {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.4rem 1.5rem 1.2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
}

.mrlm-analytics-tile-label {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #374151;
    padding-bottom: 0.5rem;
    margin-bottom: 0.75rem;
    border-bottom: 2px solid #00c853;
    align-self: center;
    text-align: center;
}

.mrlm-analytics-tile-value {
    font-size: 2.8rem;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1.1;
    margin-bottom: 0.75rem;
    text-align: center;
}

.mrlm-analytics-tile-desc {
    font-size: 0.78rem;
    color: #6b7280;
    line-height: 1.5;
    flex: 1;
    text-align: center;
}

.mrlm-analytics-tile-change {
    margin-top: 0.85rem;
    padding-top: 0.6rem;
    border-top: 1px solid #f3f4f6;
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
}

.mrlm-analytics-tile-change--good { color: #16a34a; }
.mrlm-analytics-tile-change--bad  { color: #dc2626; }

.mrlm-analytics-tile-change-period {
    font-weight: 400;
    color: #9ca3af;
    margin-left: 0.4em;
}

/* Chart tiles */
.mrlm-analytics-tile--chart .mrlm-analytics-tile-label {
    align-self: center;
    text-align: center;
    border-bottom-color: #00c853;
}

.mrlm-analytics-tile-chart {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem 0;
    flex: 1;
}

.mrlm-analytics-tile-chart canvas {
    max-width: 180px;
    max-height: 180px;
}

.mrlm-analytics-tile-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem 1rem;
    font-size: 0.8rem;
    color: #374151;
    margin-top: 0.5rem;
}

.mrlm-analytics-swatch {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    margin-right: 0.25rem;
    vertical-align: middle;
}

/* Tables */
.mrlm-analytics-table-wrap {
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

.mrlm-analytics-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.mrlm-analytics-table th {
    text-align: left;
    padding: 0.55rem 0.75rem;
    background: #f9fafb;
    border-bottom: 2px solid #e5e7eb;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    white-space: nowrap;
}

.mrlm-analytics-table td {
    padding: 0.55rem 0.75rem;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: top;
    line-height: 1.4;
}

.mrlm-analytics-table tr:last-child td {
    border-bottom: none;
}

.mrlm-analytics-table tr:hover td {
    background: #fafafa;
}

.mrlm-analytics-table a {
    color: #0e4d7a;
    text-decoration: none;
}

.mrlm-analytics-table a:hover {
    text-decoration: underline;
}

.mrlm-analytics-td-num {
    text-align: right;
    white-space: nowrap;
}

/* Geographic and System two-column grids */
.mrlm-analytics-geo-grid,
.mrlm-analytics-system-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (max-width: 900px) {
    .mrlm-analytics-tile-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 580px) {
    .mrlm-analytics-tile-grid {
        grid-template-columns: 1fr;
    }

    .mrlm-analytics-geo-grid,
    .mrlm-analytics-system-grid {
        grid-template-columns: 1fr;
    }
}
