/* RM Events Display Plugin Styles */

/* GLOBAL: Fix for EXIF image rotation - gælder ALLE billeder */
.rm-events-shortcode img,
.rm-events-calendar img,
.rm-event-card img,
.activity-item img,
.rm-modal img {
    image-orientation: from-image;
}

/* SHORTCODE STYLING */
.rm-events-shortcode {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.rm-events-calendar {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.rm-events-calendar h3 {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

.rm-events-calendar-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.rm-event-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.rm-event-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.rm-event-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    align-items: center;
    justify-content: flex-end; /* Højrestiller indholdet */
    gap: 5px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    z-index: 10;
}

/* Modal badge i header */
.rm-modal-header .rm-event-badge {
    display: flex !important;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.rm-modal-event-image {
    position: relative;
}

.rm-event-badge .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    display: inline-block;
}

.rm-event-badge .badge-text {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 700;
    white-space: nowrap;
}

/* Event Type Badge Colors */
/* RM Events - Blå */
.rm-event-badge.rm-event {
    background: linear-gradient(135deg, #2196f3, #1976d2);
    border-color: rgba(33, 150, 243, 0.5);
}

/* RM Workshop - Lilla */
.rm-event-badge.rm-workshop {
    background: linear-gradient(135deg, #9c27b0, #7b1fa2);
    border-color: rgba(156, 39, 176, 0.5);
}

/* RM Møde - Mørkeblå */
.rm-event-badge.rm-møde {
    background: linear-gradient(135deg, #3f51b5, #303f9f);
    border-color: rgba(63, 81, 181, 0.5);
}

/* RM Konference - Orange */
.rm-event-badge.rm-konference {
    background: linear-gradient(135deg, #ff5722, #e64a19);
    border-color: rgba(255, 87, 34, 0.5);
}

/* RM Netværk - Teal */
.rm-event-badge.rm-netværk {
    background: linear-gradient(135deg, #009688, #00796b);
    border-color: rgba(0, 150, 136, 0.5);
}

/* RM Uddannelse - Indigo */
.rm-event-badge.rm-uddannelse {
    background: linear-gradient(135deg, #3f51b5, #303f9f);
    border-color: rgba(63, 81, 181, 0.5);
}

/* RM Mentoring - Deep Purple */
.rm-event-badge.rm-mentoring {
    background: linear-gradient(135deg, #673ab7, #512da8);
    border-color: rgba(103, 58, 183, 0.5);
}

/* RM Opgaver - Grøn */
.rm-event-badge.rm-opgave {
    background: linear-gradient(135deg, #4caf50, #388e3c);
    border-color: rgba(76, 175, 80, 0.5);
}

/* Task badges - sekundære badges */
.rm-task-badge {
    position: absolute !important;
    top: 55px !important;
    right: 15px !important;
    padding: 6px 12px !important; /* SAMME højde som aktivitetsbadgen */
    border-radius: 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 5px !important; /* SAMME som aktivitetsbadgen */
    font-size: 11px !important; /* Kun lidt mindre tekst */
    font-weight: 600 !important;
    color: white !important;
    z-index: 9 !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2) !important;
    border: 1px solid rgba(255,255,255,0.3) !important;
    backdrop-filter: blur(10px) !important;
}

.rm-task-badge .dashicons {
    font-size: 13px; /* Lidt mindre end aktivitetsbadgen (14px) */
    width: 13px;
    height: 13px;
    display: inline-block;
}

.rm-task-badge .badge-text {
    font-size: 9px; /* Lidt mindre end aktivitetsbadgen (10px) */
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 700;
    white-space: nowrap;
}

/* Task badge farver */
.rm-task-badge.badge-connect-content {
    background: linear-gradient(135deg, #00bcd4, #0097a7);
    border-color: rgba(0, 188, 212, 0.5);
}

.rm-task-badge.badge-event-for-girls {
    background: linear-gradient(135deg, #f06292, #d81b60);
    border-color: rgba(240, 98, 146, 0.5);
}

.rm-task-badge.badge-rm-event {
    background: linear-gradient(135deg, #5c6bc0, #3949ab);
    border-color: rgba(92, 107, 192, 0.5);
}

.rm-task-badge.badge-promotion {
    background: linear-gradient(135deg, #ff7043, #e64a19);
    border-color: rgba(255, 112, 67, 0.5);
}

.rm-task-badge.badge-concept-development {
    background: linear-gradient(135deg, #ffd54f, #ffa000);
    border-color: rgba(255, 213, 79, 0.5);
    color: #333;
}

/* Girls Events - Pink/Lilla */
.rm-event-badge.girls-event,
.rm-event-badge.girls-workshop,
.rm-event-badge.girls-møde {
    background: linear-gradient(135deg, #e91e63, #ad1457);
    border-color: rgba(233, 30, 99, 0.5);
}

/* Girls Opgaver - Pink/Lilla */
.rm-event-badge.girls-opgave {
    background: linear-gradient(135deg, #e91e63, #ad1457);
    border-color: rgba(233, 30, 99, 0.5);
}

/* Ambassador Events - Guld/Orange */
.rm-event-badge.ambassador-event,
.rm-event-badge.ambassador-workshop,
.rm-event-badge.ambassador-møde {
    background: linear-gradient(135deg, #ff9800, #ef6c00);
    border-color: rgba(255, 152, 0, 0.5);
}

/* Task badges - sekundære badges */
.rm-task-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 6px 10px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    color: white;
    z-index: 11;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.2);
}

.rm-task-badge .dashicons {
    font-size: 13px;
    width: 13px;
    height: 13px;
}

.rm-task-badge .badge-text {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    font-weight: 700;
    white-space: nowrap;
}

/* Task badge farver */
.rm-task-badge.badge-connect-content {
    background: linear-gradient(135deg, #00bcd4, #0097a7);
    border-color: rgba(0, 188, 212, 0.5);
}

.rm-task-badge.badge-event-for-girls {
    background: linear-gradient(135deg, #f06292, #d81b60);
    border-color: rgba(240, 98, 146, 0.5);
}

.rm-task-badge.badge-rm-event {
    background: linear-gradient(135deg, #5c6bc0, #3949ab);
    border-color: rgba(92, 107, 192, 0.5);
}

.rm-task-badge.badge-promotion {
    background: linear-gradient(135deg, #ff7043, #e64a19);
    border-color: rgba(255, 112, 67, 0.5);
}

.rm-task-badge.badge-concept-development {
    background: linear-gradient(135deg, #ffd54f, #ffa000);
    border-color: rgba(255, 213, 79, 0.5);
    color: #333;
}

/* Ambassador Opgaver - Guld/Orange */


.rm-event-badge.ambassador-opgave {
    background: linear-gradient(135deg, #ff9800, #ef6c00);
    border-color: rgba(255, 152, 0, 0.5);
}

/* Hover effects */
.rm-event-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.rm-event-badge.rm-event:hover {
    background: linear-gradient(135deg, #1976d2, #1565c0);
}

.rm-event-badge.rm-workshop:hover {
    background: linear-gradient(135deg, #7b1fa2, #6a1b9a);
}

.rm-event-badge.rm-møde:hover {
    background: linear-gradient(135deg, #303f9f, #283593);
}

.rm-event-badge.rm-konference:hover {
    background: linear-gradient(135deg, #e64a19, #d84315);
}

.rm-event-badge.rm-netværk:hover {
    background: linear-gradient(135deg, #00796b, #00695c);
}

.rm-event-badge.rm-uddannelse:hover {
    background: linear-gradient(135deg, #303f9f, #283593);
}

.rm-event-badge.rm-mentoring:hover {
    background: linear-gradient(135deg, #512da8, #4527a0);
}

.rm-event-badge.rm-opgave:hover {
    background: linear-gradient(135deg, #388e3c, #2e7d32);
}

.rm-event-badge.girls-event:hover {
    background: linear-gradient(135deg, #ad1457, #880e4f);
}

.rm-event-badge.ambassador-event:hover,
.rm-event-badge.ambassador-opgave:hover {
    background: linear-gradient(135deg, #ef6c00, #e65100);
}



.rm-event-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
}

.rm-event-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    image-orientation: from-image;
    transition: transform 0.3s ease;
}

.rm-event-card:hover .rm-event-image img {
    transform: scale(1.05);
}

.rm-event-content {
    padding: 20px;
    position: relative;
}

.rm-event-title {
    font-family: "Raleway", Arial, sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
    line-height: 1.3;
    overflow-wrap: break-word;
    word-break: break-word;
}

.rm-event-details {
    margin-bottom: 15px;
    font-size: 14px;
    color: #666;
}

/* Overskrift / Indhold herunder */
.rm-detail-item {
    margin-bottom: 10px;
}

.rm-detail-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 2px;
}

.rm-detail-value {
    color: #555;
    margin-left: 0;
}

.rm-event-details p {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 5px;
}

.rm-event-details strong {
    color: #333;
    font-weight: 600;
}

.rm-event-description {
    color: #555;
    line-height: 1.6;
    margin-top: 15px;
}

.rm-event-description p {
    margin: 0;
}

.rm-events-no-events {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
}

/* SEARCH SHORTCODE — samme tokens / felt-stil som RM Events oversigt (admin) */
.rm-events-search-container {
    --rm-srch-pink-primary: #f1459b;
    --rm-srch-pink-light: #f3b8d4;
    --rm-srch-pink-light-15: rgba(243, 184, 212, 0.15);
    --rm-srch-pink-light-30: rgba(243, 184, 212, 0.3);
    --rm-srch-black: #000;
    --rm-srch-gray: #ccc;
    --rm-srch-radius: 10px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 16px;
    font-family: "Raleway", Arial, sans-serif;
    box-sizing: border-box;
}

.rm-events-search-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-end;
    gap: clamp(10px, 1.5vw, 14px);
    width: 100%;
    margin: 0 auto 1.25rem;
    padding: 1rem 0 0;
    box-sizing: border-box;
    background: transparent;
    border-radius: 0;
    border-top: 3px solid var(--rm-srch-pink-primary);
    box-shadow: none;
}

.rm-events-search-box {
    flex: 0 1 320px;
    min-width: min(100%, 220px);
    max-width: min(100%, 420px);
    margin-bottom: 0;
}

.rm-events-search-input {
    width: 100%;
    min-height: 40px;
    padding: 8px 12px;
    border: 1px solid var(--rm-srch-gray);
    border-radius: var(--rm-srch-radius);
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    color: var(--rm-srch-black);
    background: var(--rm-srch-pink-light-15);
    box-sizing: border-box;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease;
}

.rm-events-search-input::placeholder {
    color: rgba(0, 0, 0, 0.45);
    font-weight: 500;
}

.rm-events-search-input:hover {
    border-color: var(--rm-srch-pink-light);
    background: #fcecf4;
}

@supports (background: color-mix(in srgb, white, black)) {
    .rm-events-search-input:hover {
        background: color-mix(in srgb, var(--rm-srch-pink-light) 22%, #fff);
    }
}

.rm-events-search-input:focus {
    outline: none;
    border-color: var(--rm-srch-pink-primary);
    background: #fff;
    box-shadow: 0 0 0 2px var(--rm-srch-pink-light-30);
}

.rm-events-filter-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: clamp(10px, 1.5vw, 14px);
    flex: 1 1 auto;
    min-width: 0;
}

.rm-events-filter-select {
    min-height: 40px;
    padding: 8px 12px;
    border: 1px solid var(--rm-srch-gray);
    border-radius: var(--rm-srch-radius);
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    color: var(--rm-srch-black);
    background: #fff;
    cursor: pointer;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.rm-events-filter-select:hover {
    border-color: var(--rm-srch-pink-light);
}

.rm-events-filter-select:focus {
    outline: none;
    border-color: var(--rm-srch-pink-primary);
    box-shadow: 0 0 0 2px var(--rm-srch-pink-light-30);
}

.rm-events-search-results {
    min-height: 200px;
}

.rm-events-loading {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
}

.rm-events-error {
    text-align: center;
    padding: 40px;
    color: #dc3545;
    background: #f8d7da;
    border-radius: 8px;
}

.rm-events-search-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* PAGINATION STYLING */
.rm-events-pagination {
    margin-top: 30px;
    text-align: center;
}

.rm-events-pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.rm-events-pagination-btn {
    padding: 8px 12px;
    border: 2px solid #0073aa;
    background: white;
    color: #0073aa;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.rm-events-pagination-btn:hover {
    background: #0073aa;
    color: white;
}

.rm-events-pagination-current {
    padding: 8px 12px;
    background: #0073aa;
    color: white;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
}

/* Responsive design */
@media (max-width: 1024px) {
    .rm-events-shortcode {
        grid-template-columns: repeat(2, 1fr);
    }
    .rm-events-calendar-list,
    .rm-events-search-list {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 768px) {
    .rm-events-shortcode,
    .rm-events-calendar,
    .rm-events-search-container {
        padding: 10px;
    }
    
    .rm-events-calendar-list,
    .rm-events-search-list {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .rm-events-filter-controls {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .rm-event-card {
        margin-bottom: 15px;
    }
    
    .rm-event-content {
        padding: 15px;
    }
    
    .rm-event-title {
        font-size: 18px;
    }
    
    .rm-event-details {
        gap: 10px;
    }
    
    .rm-events-pagination-controls {
        gap: 5px;
    }
    
    .rm-events-pagination-btn {
        padding: 6px 10px;
        font-size: 12px;
    }
}

/* Single Event Response Styling */
.rm-single-event-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.rm-response-section {
    margin: 30px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.rm-response-section h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 18px;
}

.rm-response-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.rm-response-btn {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #ddd;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.rm-response-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.rm-response-btn.active {
    border-color: #0073aa;
    background: #0073aa;
    color: white;
}

.rm-response-yes:hover {
    border-color: #28a745;
    background: #28a745;
    color: white;
}

.rm-response-no:hover {
    border-color: #dc3545;
    background: #dc3545;
    color: white;
}

.rm-comment-section {
    margin-top: 20px;
}

.rm-comment-section label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.rm-event-comment {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
    font-family: inherit;
}

.rm-event-comment:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
}

.rm-event-stats {
    margin: 30px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.rm-event-stats h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 18px;
    text-align: center;
}

.rm-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.rm-stat-item {
    text-align: center;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.rm-stat-number {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: #0073aa;
    margin-bottom: 5px;
}

.rm-stat-label {
    display: block;
    font-size: 14px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rm-login-required {
    margin: 30px 0;
    padding: 20px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    text-align: center;
    color: #856404;
}

.rm-message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-weight: 600;
}

.rm-message-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.rm-message-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.rm-message-info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* Success besked i modal */
.rm-modal .rm-message {
    margin: 10px;
    border-radius: 4px;
    position: relative;
    z-index: 10010;
}

/* Modal Styling */
.rm-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.rm-modal {
    background: white;
    border-radius: 12px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.7);
    opacity: 0;
    transition: all 0.3s ease;
}

.rm-modal-active {
    transform: scale(1);
    opacity: 1;
}

.rm-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #e0e0e0;
    background: #f9f9f9;
    border-radius: 12px 12px 0 0;
}

/* Skjul kun titel i header */
.rm-modal-header h2,
.rm-modal-header h3 {
    display: none !important;
}

/* Tving rækkefølge: Badge til venstre, lukkekryds til højre */
.rm-modal-header .rm-modal-event-badge {
    order: 1 !important;
}

.rm-modal-header .rm-modal-close {
    order: 2 !important;
}

.rm-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    z-index: 10001;
    position: relative;
}

.rm-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #e0e0e0;
    background: #f9f9f9;
    border-radius: 12px 12px 0 0;
    position: relative;
    z-index: 10000;
    flex-direction: row-reverse;
}

/* Header right styling fjernet - bruger ikke længere */

/* Sikre at lukkekrydset altid er øverst i modal */
.rm-modal-header .rm-modal-close {
    z-index: 10002 !important;
    position: relative !important;
    background: white !important;
    border: 1px solid #ddd !important;
}

.rm-modal-close:hover {
    background: #e0e0e0;
    color: #333;
}

.rm-modal-body {
    padding: 25px;
}

.rm-modal-event-details {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 25px;
    margin-bottom: 30px;
}

.rm-modal-event-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: 8px;
}

.rm-modal-event-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rm-modal-event-info h3 {
    margin: 0 0 15px 0;
    font-size: 20px;
    color: #333;
}

.rm-modal-event-info p {
    margin: 8px 0;
    color: #666;
    line-height: 1.5;
}

.rm-modal-event-info strong {
    color: #333;
}

/* Beskrivelse med linjeskift i modal */
.rm-modal-description-wrap {
    margin-top: 12px;
}
.rm-event-description-text {
    color: #555;
    line-height: 1.6;
    white-space: normal;
}
.rm-event-description-text br {
    display: block;
    content: "";
    margin-bottom: 0.35em;
}

.rm-modal-loading,
.rm-modal-error {
    text-align: center;
    padding: 60px 20px;
    font-size: 18px;
    color: #666;
}

.rm-modal-error {
    color: #dc3545;
}

/* Cursor pointer for clickable cards */
.rm-event-card {
    cursor: pointer;
    transition: transform 0.2s ease;
    width: 100%;
    height: auto;
}

.rm-event-card:hover {
    transform: translateY(-2px);
}

/* Ensure grid works correctly */
.rm-events-calendar-list,
.rm-events-search-list {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 20px !important;
}

/* Responsive modal */
@media (max-width: 1024px) {
    .rm-events-shortcode {
        grid-template-columns: repeat(2, 1fr);
    }
    .rm-events-calendar-list,
    .rm-events-search-list {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 768px) {
    .rm-modal-overlay {
        padding: 10px;
    }
    
    .rm-modal {
        max-height: 95vh;
    }
    
    .rm-modal-event-details {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .rm-modal-event-image {
        height: 150px;
    }
    
    .rm-modal-header {
        padding: 15px 20px;
    }
    
    .rm-modal-header h2 {
        font-size: 20px;
    }
    
    .rm-modal-body {
        padding: 20px;
    }
}

/* Send svar knap styling */
.rm-send-btn {
    background-color: #2196F3;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    margin-top: 10px;
    transition: all 0.3s ease;
}

.rm-send-btn:hover {
    background-color: #1976D2;
    transform: translateY(-1px);
}

.rm-response-btn.active {
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
    transform: scale(1.05);
}

/* Girls Calendar View - Gantt Chart Style */
.girls-calendar-view-container {
    margin: 20px 0;
}

.girls-calendar-view {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 20px 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.calendar-month {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
}

.calendar-month h3 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin: 0;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
}

.calendar-week {
    display: grid;
    grid-template-columns: 80px 1fr; /* Week number + events area */
    gap: 1px;
    background: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
    min-height: 60px; /* Mindre højde for kvadratiske kasser */
}

.calendar-week:last-child {
    border-bottom: none;
}

.week-number {
    background: #f8f9fa;
    padding: 6px;
    text-align: center;
    font-weight: 700;
    color: #6c757d;
    border-right: 1px solid #ccc;
    font-size: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60px; /* Matcher calendar-week højde */
    box-sizing: border-box;
}

.week-number small {
    font-size: 10px;
    font-weight: 400;
    color: #999;
    margin-top: 2px;
}

.week-events {
    background: white;
    padding: 2px;
    border-right: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0; /* Grå streg under hver uge */
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 kasser side om side */
    gap: 2px;
    min-height: 60px; /* Matcher calendar-week højde */
}

.activity-slot {
    position: relative;
    height: 100%;
}

.activity-placeholder {
    background: #e9ecef;
    border: 2px dashed #adb5bd;
    border-radius: 4px;
    padding: 8px;
    text-align: center;
    color: #6c757d;
    font-size: 12px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.activity-item {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 4px 6px;
    border-radius: 3px;
    margin: 0;
    font-size: 9px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    position: relative;
}

/* Farvekodning for pigernes aktiviteter - ren farve uden gradient */
.activity-item[data-activity-type="camps"] {
    background: #FFD700; /* Ren gul */
}

.activity-item[data-activity-type="gå-til-science"] {
    background: #32CD32; /* Ren grøn */
}

.activity-item[data-activity-type="forældre-datter"] {
    background: #DDA0DD; /* Ren lavendel */
}

.activity-item[data-activity-type="workshop"] {
    background: #DC143C; /* Ren rød */
}

/* Lokalitetsbaserede farver (overskriver aktivitetstype) */
.activity-item[data-location-code="CPH"] {
    background: #FFD700; /* København = Gul */
}

.activity-item[data-location-code="AAR"] {
    background: #32CD32; /* Aarhus = Grøn */
}

.activity-item[data-location-code="ODE"] {
    background: #FF6B6B; /* Odense = Rød/Coral */
}

.activity-item[data-location-code="SDBG"] {
    background: #4ECDC4; /* Sønderborg = Turkis */
}

/* Lokalitetsforkortelser styling - uden tekstskygge */
.location-code {
    font-size: 10px;
    font-weight: 700;
    color: white;
    letter-spacing: 0.5px;
}

.activity-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.activity-title {
    font-weight: 600;
    margin-bottom: 1px;
    font-size: 10px;
}

.activity-date {
    font-size: 9px;
    opacity: 0.9;
}

/* Responsive design */
@media (max-width: 1200px) {
    .girls-calendar-view {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .girls-calendar-view {
        grid-template-columns: 1fr;
    }
    
    .calendar-week {
        grid-template-columns: 1fr;
    }
    
    .week-number {
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }
    
    .week-events {
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }
}

/* Event Modal Styling */
.event-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.event-modal {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.event-modal-overlay[style*="opacity: 1"] .event-modal {
    transform: scale(1);
}

.event-modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.event-modal-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.event-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.event-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.event-modal-content {
    padding: 24px;
    max-height: calc(80vh - 80px);
    overflow-y: auto;
}

.event-modal-info {
    margin-bottom: 20px;
}

.event-info-item {
    margin-bottom: 12px;
    font-size: 16px;
    line-height: 1.5;
}

.event-info-item strong {
    color: #333;
    margin-right: 8px;
}

.event-modal-description {
    border-top: 1px solid #e0e0e0;
    padding-top: 20px;
}

.event-modal-description h3 {
    margin: 0 0 12px 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.event-modal-description p,
.event-modal-description-text {
    margin: 0;
    color: #666;
    line-height: 1.6;
}
.event-modal-description-text br {
    display: block;
    margin-bottom: 0.35em;
}

/* Responsive modal */
@media (max-width: 768px) {
    .event-modal {
        width: 95%;
        margin: 20px;
    }
    
    .event-modal-header {
        padding: 16px 20px;
    }
    
    .event-modal-header h2 {
        font-size: 18px;
    }
    
    .event-modal-content {
        padding: 20px;
    }
}

/* Advanced Search Styles */
.rm-events-search-advanced {
    margin: 20px 0;
}

.search-form-container {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.search-form-container h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 24px;
}

.advanced-search-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    align-items: end;
}

.search-field {
    display: flex;
    flex-direction: column;
}

.search-field label {
    font-weight: 600;
    margin-bottom: 5px;
    color: #555;
}

.search-field input,
.search-field select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.search-field input:focus,
.search-field select:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.2);
}

.search-btn,
.clear-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-btn {
    background: #007cba;
    color: white;
}

.search-btn:hover {
    background: #005a87;
}

.clear-btn {
    background: #6c757d;
    color: white;
    margin-top: 10px;
}

.clear-btn:hover {
    background: #545b62;
}

.search-results-info {
    margin-bottom: 20px;
}

.search-results-info p {
    font-size: 16px;
    color: #666;
    margin: 0;
}

/* Events Grid */
.rm-events-grid-container {
    margin-top: 20px;
}

.rm-events-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* Responsive Grid */
@media (max-width: 1024px) {
    .rm-events-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .rm-events-grid {
        grid-template-columns: 1fr;
    }
    
    .advanced-search-form {
        grid-template-columns: 1fr;
    }
    
    .search-field {
        margin-bottom: 10px;
    }
}

/* Hidden class for filtered items */
.rm-event-card.hidden {
    display: none;
}

/* RM-tæller – uden grå boks (bruger .rm-detail-item) */
.rm-counter-frontend {
    margin: 0;
    padding: 0;
    background: none !important;
    border: none !important;
}

/* The task: (opgaven beskrevet ultra kort) */
.rm-task-short {
    margin-top: 12px;
}
.rm-task-short p {
    margin: 0 0 8px 0;
    color: #555;
    line-height: 1.5;
}
.rm-task-short strong {
    color: #333;
}

/* ==========================================================
   H5G TEST: pass 1 — newsite-lignende eventkort (kun kort)
   Inkl. [rm_events] / [rm_tasks] (.rm-events-shortcode)
   ========================================================== */
.rm-events-shortcode,
.rm-events-grid,
.rm-events-search-list,
.rm-events-calendar-list {
    grid-template-columns: repeat(2, minmax(320px, 373px)) !important;
    justify-content: center;
    gap: 28px !important;
    margin: 24px 0 !important;
}

.rm-events-shortcode .rm-event-card,
.rm-events-grid .rm-event-card,
.rm-events-search-list .rm-event-card,
.rm-events-calendar-list .rm-event-card {
    margin-bottom: 0;
}

.h5g-rm-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 373px;
    min-height: 603px;
    background: rgba(243, 184, 212, 0.15) !important;
    border-radius: 10px;
    border: 1px solid #eadce3;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    font-family: "Raleway", Arial, sans-serif;
}

.h5g-rm-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
}

.h5g-rm-card-image-wrap {
    flex: 0 0 263px;
    height: 263px;
    padding: 0;
    background: transparent;
    overflow: hidden;
}

.h5g-rm-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    border: 0;
    display: block;
}

.h5g-rm-card-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1 1 auto;
    min-height: 0;
    padding: 14px 16px 18px;
}

.h5g-rm-card-badge-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px 8px;
    margin-bottom: 14px;
}

.h5g-rm-card-title {
    margin: 4px 0 10px;
    color: #111 !important;
    font-family: "Raleway", Arial, sans-serif !important;
    font-size: 24px !important;
    line-height: 1.1 !important;
    font-weight: 900 !important;
    text-transform: uppercase !important;
    letter-spacing: -0.01em;
    overflow-wrap: break-word;
    word-break: break-word;
}

.h5g-rm-card-meta {
    font-family: "Raleway", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.35;
    margin: 0 0 12px;
}

.h5g-rm-card-meta-line {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.h5g-rm-card-meta-location {
    font-family: "Raleway", Arial, sans-serif;
    font-size: 14px;
    font-weight: 700;
}

.h5g-rm-card-meta-date {
    font-family: "Raleway", Arial, sans-serif;
    font-size: 14px;
    font-weight: 400;
}

.h5g-rm-card-desc {
    flex: 1 1 auto;
    min-height: 0;
    margin-top: 0;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.45;
}

.h5g-rm-card .rm-detail-label {
    font-family: "Raleway", Arial, sans-serif;
    font-size: 14px;
    font-weight: 700;
}

.h5g-rm-card .rm-detail-value {
    font-family: "Raleway", Arial, sans-serif;
    font-size: 14px;
    font-weight: 400;
}

.h5g-rm-card .rm-event-badge {
    position: static;
    min-width: 0;
    min-height: 28px;
    height: auto;
    border-radius: 10px;
    padding: 6px 12px;
    justify-content: center;
    align-items: center;
    background: rgba(243, 184, 212, 0.9);
    border: 0;
    box-shadow: none;
    color: #111;
}

.h5g-rm-card .rm-event-badge .badge-text {
    font-family: "Raleway", Arial, sans-serif;
    font-size: 11px;
    letter-spacing: 0.02em;
    line-height: 1.3;
    color: #111;
    font-weight: 900;
    text-transform: uppercase;
}

.h5g-rm-card .rm-event-badge .dashicons {
    color: #111;
}

.h5g-rm-card-cta {
    flex-shrink: 0;
    margin-top: auto;
    align-self: flex-start;
    width: 169px;
    min-height: 49px;
    border-radius: 10px;
    background: #e93e9f;
    color: #111;
    font-size: 16px;
    font-weight: 900;
    font-family: "Raleway", Arial, sans-serif;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 0 rgba(0, 0, 0, 0.16);
}

@media (max-width: 1024px) {
    .rm-events-shortcode,
    .rm-events-grid,
    .rm-events-search-list,
    .rm-events-calendar-list {
        grid-template-columns: repeat(2, minmax(280px, 1fr)) !important;
    }
}

@media (max-width: 768px) {
    .rm-events-shortcode,
    .rm-events-grid,
    .rm-events-search-list,
    .rm-events-calendar-list {
        grid-template-columns: 1fr !important;
    }

    .h5g-rm-card {
        max-width: 373px;
        margin: 0 auto;
    }
}

/* ==========================================================
   Kalender / [rm_events_search_advanced] — Figma-lignende
   (3 kolonner, overskrift, by-pills; overstyrer pass 1-grid her)
   ========================================================== */
/* Bruger hele temaets indholdsbredde (Figma antager ofte ~1200px; smal kolonne = smalle kort) */
.rm-events-advanced-page {
    /* Samme som rm-events-admin-tokens.css (scoped til oversigten / kalender) */
    --rm-adv-pink-primary: #f1459b;
    --rm-adv-pink-light: #f3b8d4;
    --rm-adv-pink-light-15: rgba(243, 184, 212, 0.15);
    --rm-adv-pink-light-30: rgba(243, 184, 212, 0.3);
    --rm-adv-black: #000000;
    --rm-adv-gray: #cccccc;
    --rm-adv-dark-blue: #190d68;
    --rm-adv-radius: 10px;
    --rm-adv-spacing-base: 8px;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 0 48px;
    font-family: "Raleway", Arial, sans-serif;
    box-sizing: border-box;
}

/*
 * Full-bleed: bryder ud af smal .entry-content til næsten hele viewport,
 * så 3-kolonne-grid får plads som i Figma. Slås fra med shortcode full_width="false".
 * (Kan give vandret scroll hvis temaet ikke har overflow-x på body — så sæt full_width="false".)
 */
.rm-events-advanced-page--bleed {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
    box-sizing: border-box;
    position: relative;
}

.rm-events-advanced-page--bleed .rm-events-search-advanced,
.rm-events-advanced-page--bleed .rm-events-grid-container {
    max-width: min(1320px, 100%);
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

.rm-events-advanced-page .rm-events-grid-container {
    width: 100%;
    max-width: 100%;
}

/* Figma + newsite hero (h1): Raleway Black, 64px — clamp så mobil ikke sprænger */
.rm-events-advanced-page .rm-events-rm-page-title {
    margin: 0 auto 20px;
    max-width: 100%;
    font-family: "Raleway", Arial, sans-serif;
    font-size: clamp(32px, 6vw, 64px);
    font-weight: 900;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    text-align: center;
    color: #111;
    line-height: 1.2;
}

/* Lokation-chips: samme som admin; ingen pink streg under sidetitel */
.rm-events-advanced-page .rm-events-city-pills.rm-events-location-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: calc(var(--rm-adv-spacing-base) * 2);
    width: 100%;
    margin: 0 0 1.25rem;
    padding: 0;
    box-sizing: border-box;
    border-top: none;
}

.rm-events-advanced-page .rm-city-pill {
    appearance: none;
    -webkit-appearance: none;
    box-sizing: border-box;
    margin: 0;
    flex: 0 1 auto;
    min-width: 0;
    padding: 10px 20px;
    font-family: "Raleway", Arial, sans-serif;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.2;
    color: var(--rm-adv-black);
    background: transparent;
    border: 0;
    border-radius: var(--rm-adv-radius);
    box-shadow: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: background-color 0.2s ease, color 0.2s ease, font-weight 0.2s ease;
}

.rm-events-advanced-page .rm-city-pill:hover {
    background: var(--rm-adv-pink-light-30);
    color: var(--rm-adv-black);
    font-weight: 500;
}

.rm-events-advanced-page .rm-city-pill.is-active {
    background: var(--rm-adv-pink-primary);
    color: var(--rm-adv-black);
    font-weight: 900;
    box-shadow: none;
}

.rm-events-advanced-page .rm-city-pill:focus {
    outline: none;
}

.rm-events-advanced-page .rm-city-pill:focus-visible {
    outline: 2px solid var(--rm-adv-black);
    outline-offset: 2px;
}

/* Kun lokation-dropdown (show_city_pills=false) — samme feltstil som tidligere søgeform */
.rm-events-advanced-page .rm-events-advanced-location-only {
    margin: 0 auto 1.25rem;
    max-width: 1200px;
    text-align: center;
    box-sizing: border-box;
}

.rm-events-advanced-page .rm-events-advanced-location-only label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: rgba(0, 0, 0, 0.65);
    margin-bottom: 6px;
}

.rm-events-advanced-page .rm-events-advanced-location-only select {
    width: 100%;
    max-width: 360px;
    min-height: 40px;
    padding: 8px 12px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    color: var(--rm-adv-black);
    border: 1px solid var(--rm-adv-gray);
    border-radius: var(--rm-adv-radius);
    background: #fff;
    box-sizing: border-box;
}

.rm-events-advanced-page .rm-events-advanced-location-only select:hover {
    border-color: var(--rm-adv-pink-light);
}

.rm-events-advanced-page .rm-events-advanced-location-only select:focus {
    outline: none;
    border-color: var(--rm-adv-pink-primary);
    box-shadow: 0 0 0 2px var(--rm-adv-pink-light-30);
}

.rm-events-advanced-page .rm-events-search-heading {
    margin: 0 0 12px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--rm-adv-dark-blue);
    text-align: center;
}

.rm-events-advanced-page .search-form-container {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    margin: 0 auto 1.25rem;
    max-width: 1200px;
    width: 100%;
    box-sizing: border-box;
}

.rm-events-advanced-page .advanced-search-form {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-end;
    gap: clamp(10px, 1.5vw, 14px);
    width: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.rm-events-advanced-page .search-field {
    flex: 0 1 auto;
    min-width: min(100%, 160px);
}

.rm-events-advanced-page .search-field label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: rgba(0, 0, 0, 0.65);
    margin-bottom: 6px;
}

.rm-events-advanced-page .search-field input[type="text"],
.rm-events-advanced-page .search-field input[type="date"],
.rm-events-advanced-page .search-field select {
    width: 100%;
    min-height: 40px;
    padding: 8px 12px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    color: var(--rm-adv-black);
    border: 1px solid var(--rm-adv-gray);
    border-radius: var(--rm-adv-radius);
    box-shadow: none;
    box-sizing: border-box;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease;
}

/* NB: ikke sæt flex-basis/shorthand på input inde i .search-field (column-flex) — det bliver til højde */
.rm-events-advanced-page .search-field input[type="text"] {
    width: min(100%, 420px);
    max-width: 100%;
    min-width: 0;
    height: auto;
    font-weight: 700;
    background: var(--rm-adv-pink-light-15);
}

.rm-events-advanced-page .search-field input[type="text"]::placeholder {
    color: rgba(0, 0, 0, 0.45);
    font-weight: 500;
}

.rm-events-advanced-page .search-field input[type="text"]:hover {
    border-color: var(--rm-adv-pink-light);
    background: #fcecf4;
}

@supports (background: color-mix(in srgb, white, black)) {
    .rm-events-advanced-page .search-field input[type="text"]:hover {
        background: color-mix(in srgb, var(--rm-adv-pink-light) 22%, #fff);
    }
}

.rm-events-advanced-page .search-field input[type="text"]:focus,
.rm-events-advanced-page .search-field input[type="date"]:focus,
.rm-events-advanced-page .search-field select:focus {
    outline: none;
    border-color: var(--rm-adv-pink-primary);
    background: #fff;
    box-shadow: 0 0 0 2px var(--rm-adv-pink-light-30);
}

.rm-events-advanced-page .search-field input[type="date"],
.rm-events-advanced-page .search-field select {
    background: #fff;
}

.rm-events-advanced-page .search-field input[type="date"]:hover,
.rm-events-advanced-page .search-field select:hover {
    border-color: var(--rm-adv-pink-light);
}

.rm-events-advanced-page .search-field:has(.search-btn),
.rm-events-advanced-page .search-field:has(.clear-btn) {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px;
    min-width: 0;
}

.rm-events-advanced-page .search-field:has(.search-btn) label,
.rm-events-advanced-page .search-field:has(.clear-btn) label {
    width: 100%;
    flex-basis: 100%;
}

.rm-events-advanced-page .search-btn,
.rm-events-advanced-page .clear-btn {
    min-height: 40px;
    padding: 8px 20px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-radius: var(--rm-adv-radius);
    cursor: pointer;
    margin-top: 0;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.rm-events-advanced-page .search-btn {
    background: var(--rm-adv-pink-primary);
    color: var(--rm-adv-black);
    border: 1px solid var(--rm-adv-pink-primary);
}

.rm-events-advanced-page .search-btn:hover {
    background: var(--rm-adv-pink-light);
    border-color: var(--rm-adv-pink-light);
    color: var(--rm-adv-black);
}

.rm-events-advanced-page .clear-btn {
    background: #fff;
    color: var(--rm-adv-black);
    border: 1px solid var(--rm-adv-gray);
}

.rm-events-advanced-page .clear-btn:hover {
    border-color: var(--rm-adv-pink-light);
    background: var(--rm-adv-pink-light-15);
}

.rm-events-advanced-page .rm-events-location-select-sr {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Standard: 2 kolonner = ca. 50% bredde pr. kort i smal .entry-content (ofte bedre end 3 smalle) */
.rm-events-advanced-page--cols-2 .rm-events-grid {
    width: 100%;
    max-width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    justify-content: stretch !important;
    gap: 24px !important;
    margin-top: 8px !important;
}

.rm-events-advanced-page--cols-3 .rm-events-grid {
    width: 100%;
    max-width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    justify-content: stretch !important;
    gap: 24px !important;
    margin-top: 8px !important;
}

.rm-events-advanced-page--cols-4 .rm-events-grid {
    width: 100%;
    max-width: 100%;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    justify-content: stretch !important;
    gap: 20px !important;
    margin-top: 8px !important;
}

/* Fleksibelt: så mange kort pr. række som der er plads til (smal kolonne → færre, bred → flere) */
.rm-events-advanced-page--cols-auto .rm-events-grid {
    width: 100%;
    max-width: 100%;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important;
    justify-content: stretch !important;
    gap: 20px !important;
    margin-top: 8px !important;
}

/* Undgår “høj smal søjle”: global .h5g-rm-card har min-height 603px — her følger kort kolonnebredden */
.rm-events-advanced-page .h5g-rm-card {
    max-width: 100% !important;
    min-height: 0 !important;
}

.rm-events-advanced-page .h5g-rm-card-image-wrap {
    flex: 0 0 auto;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    max-height: none;
}

/* 3-kolonne-layout: tablet → 2, mobil → 1 */
@media (max-width: 1100px) {
    .rm-events-advanced-page--cols-3 .rm-events-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .rm-events-advanced-page--cols-4 .rm-events-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 900px) {
    .rm-events-advanced-page--cols-4 .rm-events-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 768px) {
    .rm-events-advanced-page--cols-2 .rm-events-grid,
    .rm-events-advanced-page--cols-3 .rm-events-grid,
    .rm-events-advanced-page--cols-4 .rm-events-grid {
        grid-template-columns: 1fr !important;
    }

    /* auto-fill: ét kort pr. række på mobil */
    .rm-events-advanced-page--cols-auto .rm-events-grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .rm-events-advanced-page .h5g-rm-card {
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* =============================================================================
   RM event modal (newsite-aligned) — kun .rm-modal--rm-event
   Reference layout: back + close row, left media (carousel + status), right pill/title/meta
   ============================================================================= */
.rm-modal--rm-event {
    font-family: "Raleway", Arial, sans-serif;
    max-width: min(1020px, 96vw);
    border-radius: 12px;
    /* Figma «Drop shadow»: X 4, Y 4, blur 4, spread 0, #000 @ 17 % — knapper, pills, status m.m. */
    --rm-modal-figma-drop-shadow: 4px 4px 4px 0 rgba(0, 0, 0, 0.17);
    box-shadow: 4px 8px 24px rgba(0, 0, 0, 0.18);
    overflow-x: visible;
}

.rm-modal--rm-event .rm-modal-body {
    /* Ekstra top så participation-pills (translateY -50 %) ikke klippes mod modal-top */
    padding: 36px 24px 28px;
    overflow-x: visible;
}

.rm-modal--rm-event .rm-modal-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.rm-modal--rm-event .rm-modal-toolbar--back-only {
    justify-content: flex-start;
}

.rm-modal--rm-event .rm-modal-toolbar__spacer {
    flex: 1;
}

.rm-modal--rm-event .rm-modal-back-link {
    display: inline-flex;
    align-items: center;
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #000;
    text-decoration: none;
}

.rm-modal--rm-event .rm-modal-back-link:hover,
.rm-modal--rm-event .rm-modal-back-link:focus {
    color: #000;
    text-decoration: underline;
}

.rm-modal--rm-event .rm-modal-back-link:focus-visible {
    outline: 2px solid #f1459b;
    outline-offset: 2px;
}

.rm-modal--rm-event .rm-modal-close {
    flex-shrink: 0;
    margin: 0;
    padding: 4px 10px;
    border: none;
    background: transparent;
    font-size: 28px;
    line-height: 1;
    color: #111;
    cursor: pointer;
    border-radius: 8px;
}

.rm-modal--rm-event .rm-modal-close:hover {
    background: rgba(0, 0, 0, 0.06);
}

/* Participation pills: halvdelen over billedets top, skubbet mod højre (newsite / admin-kort idé) — ingen ramme */
.rm-modal--rm-event .rm-event-stats--on-image {
    position: absolute;
    z-index: 6;
    top: 0;
    left: 16px;
    right: -20px;
    width: auto;
    margin: 0;
    padding: 0;
    pointer-events: none;
    background: transparent;
    border: none;
    transform: translateY(-50%);
    box-sizing: border-box;
}

/* RM task: VOLUNTEERS / COMMITTED til højre på billedet, lidt uden for kanten (som task-kort) */
.rm-modal--rm-event .rm-event-stats--on-image.rm-event-stats--task-volunteers {
    left: auto;
    right: -16px;
    width: auto;
    max-width: calc(100% + 20px);
}

.rm-modal--rm-event .rm-stats-grid--on-image {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 6px;
    align-items: stretch;
    justify-content: flex-start;
}

.rm-modal--rm-event .rm-stats-grid--on-image .rm-stat-item {
    flex: 1 1 0;
    min-width: 0;
    margin: 0;
    padding: 5px 6px;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 0.3em;
    white-space: nowrap;
    text-align: center;
    font-size: clamp(9px, 2.5vw, 11px);
    font-weight: 800;
    line-height: 1.2;
    border-radius: 10px;
    border: none !important;
    outline: none !important;
    box-shadow: var(--rm-modal-figma-drop-shadow) !important;
    background: #fff;
}

.rm-modal--rm-event .rm-stats-grid--on-image .rm-stat-item--pending {
    background: #fff;
    color: rgba(0, 0, 0, 0.5);
    box-shadow: var(--rm-modal-figma-drop-shadow) !important;
}

.rm-modal--rm-event .rm-stats-grid--on-image .rm-stat-item--declined {
    background: #fff;
    color: rgba(0, 0, 0, 0.65);
    box-shadow: var(--rm-modal-figma-drop-shadow) !important;
}

.rm-modal--rm-event .rm-stats-grid--on-image .rm-stat-item--attending {
    background: #fff;
    color: rgba(0, 0, 0, 1);
    box-shadow: var(--rm-modal-figma-drop-shadow) !important;
}

.rm-modal--rm-event .rm-stats-grid--on-image .rm-stat-number {
    display: inline;
    margin: 0;
    padding: 0;
    font-size: clamp(9px, 2.5vw, 11px) !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    letter-spacing: 0.03em;
    color: inherit;
}

.rm-modal--rm-event .rm-stats-grid--on-image .rm-stat-label {
    display: inline;
    margin: 0;
    padding: 0;
    font-size: clamp(9px, 2.5vw, 11px) !important;
    font-weight: 800 !important;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    line-height: 1.2 !important;
    color: inherit;
}

/* RM task modal: VOLUNTEERS + COMMITTED — én linje, samme «højde» som .rm-modal-activity-pill */
.rm-modal--rm-event .rm-stats-grid--on-image.rm-stats-grid--task {
    gap: 6px;
}

.rm-modal--rm-event .rm-stats-grid--on-image.rm-stats-grid--task .rm-stat-item {
    flex: 0 0 auto;
    width: max-content;
    max-width: 100%;
    flex-direction: row-reverse;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 0.3em;
    padding: 7px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    line-height: 1.2;
    min-height: 0;
    background: #fff !important;
    box-shadow: var(--rm-modal-figma-drop-shadow) !important;
}

.rm-modal--rm-event .rm-stats-grid--on-image.rm-stats-grid--task .rm-stat-number,
.rm-modal--rm-event .rm-stats-grid--on-image.rm-stats-grid--task .rm-stat-label {
    display: inline;
    margin: 0;
    padding: 0;
    font-size: 11px !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.rm-modal--rm-event .rm-stats-grid--on-image.rm-stats-grid--task .rm-stat-number {
    font-weight: 900 !important;
}

.rm-modal--rm-event .rm-stats-grid--on-image.rm-stats-grid--task .rm-stat-item--volunteers {
    color: rgba(0, 0, 0, 0.72);
}

.rm-modal--rm-event .rm-stats-grid--on-image.rm-stats-grid--task .rm-stat-item--committed {
    color: #111;
}

/* Two columns: media + RSVP | info — left column matches preset card image 373×263 */
.rm-modal--rm-event .rm-modal-event-details {
    display: grid;
    grid-template-columns: minmax(0, 373px) minmax(0, 1fr);
    gap: 32px;
    align-items: start;
    margin-top: 14px;
    margin-bottom: 0;
}

.rm-modal--rm-event .rm-modal-event-left {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
    max-width: 373px;
    overflow: visible;
}

.rm-modal--rm-event .rm-modal-event-media {
    position: relative;
    width: 100%;
    max-width: 373px;
    overflow: visible;
}

.rm-modal--rm-event .rm-modal-event-image {
    position: relative;
    width: 100%;
    max-width: 373px;
    height: 263px;
    aspect-ratio: 373 / 263;
    max-height: 263px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.rm-modal--rm-event .rm-modal-event-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* RM task (opgave) i modal: hele billedet synligt (portræt/plakat), ikke 373×263 cover-beskæring. */
.rm-modal--rm-event .rm-modal-event-image.rm-modal-event-image--task {
    height: auto;
    min-height: 180px;
    max-height: min(70vh, 440px);
    aspect-ratio: unset;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Samme pink som preset/oversigt — letterboxing ved contain forsvinder visuelt */
    background: #f3b8d4;
}

.rm-modal--rm-event .rm-modal-event-image.rm-modal-event-image--task img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: min(70vh, 440px);
    object-fit: contain;
}

.rm-modal--rm-event .rm-modal-gallery.rm-modal-gallery--task .rm-modal-gallery__frame {
    height: auto;
    min-height: 180px;
    max-height: min(70vh, 440px);
    aspect-ratio: unset;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3b8d4;
}

.rm-modal--rm-event .rm-modal-gallery.rm-modal-gallery--task .rm-modal-gallery__img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: min(70vh, 440px);
    object-fit: contain;
}

.rm-modal--rm-event .rm-modal-event-image--placeholder {
    background: rgba(243, 184, 212, 0.35);
    height: 263px;
    max-width: 373px;
    aspect-ratio: 373 / 263;
}

.rm-modal--rm-event .rm-modal-gallery {
    position: relative;
    max-width: 373px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.rm-modal--rm-event .rm-modal-gallery__frame {
    width: 100%;
    height: 263px;
    max-height: 263px;
    aspect-ratio: 373 / 263;
    background: #f5f5f5;
}

.rm-modal--rm-event .rm-modal-gallery__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.rm-modal--rm-event .rm-modal-gallery__btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    padding: 0;
    margin: 0;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.92);
    color: #111;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--rm-modal-figma-drop-shadow);
}

.rm-modal--rm-event .rm-modal-gallery__btn:hover {
    background: #fff;
}

.rm-modal--rm-event .rm-modal-gallery__btn:focus-visible {
    outline: 2px solid #f1459b;
    outline-offset: 2px;
}

.rm-modal--rm-event .rm-modal-gallery__btn--prev {
    left: 10px;
}

.rm-modal--rm-event .rm-modal-gallery__btn--next {
    right: 10px;
}

.rm-modal--rm-event .rm-modal-image-status {
    position: absolute;
    top: 44px;
    right: 6px;
    z-index: 5;
    max-width: min(220px, 78%);
    padding: 10px 14px;
    background: #fff;
    border-radius: 10px;
    box-shadow: var(--rm-modal-figma-drop-shadow);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.3;
    color: #111;
    text-align: center;
}

.rm-modal--rm-event .rm-modal-image-status__line {
    display: block;
}

.rm-modal--rm-event .rm-modal-image-status__sub {
    display: block;
    font-size: 12px;
    font-weight: 700;
    margin-top: 4px;
}

.rm-modal--rm-event .rm-modal-activity-pill {
    display: inline-block;
    margin: 0 0 12px;
    padding: 8px 16px;
    border-radius: 10px;
    background: #f3b8d4;
    color: #111;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1.2;
    box-shadow: none;
}

.rm-modal--rm-event .rm-modal-event-title {
    margin: 0 0 10px;
    font-size: clamp(24px, 2.8vw, 38px);
    font-weight: 900;
    line-height: 1.1;
    font-family: "Raleway", Arial, sans-serif;
    text-transform: uppercase;
    color: #111;
    letter-spacing: -0.02em;
}

.rm-modal--rm-event .rm-modal-event-kicker {
    margin: 0 0 18px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.1em;
    line-height: 1.35;
    color: #111;
}

.rm-modal--rm-event .rm-modal-meta-list {
    list-style: none;
    margin: 0 0 18px;
    padding: 0;
}

/* Tema / WP: undgå ekstra kugler ved siden af Lucide-ikoner (liste-markører) */
.rm-modal--rm-event .rm-modal-meta-list,
.rm-modal--rm-event .rm-modal-meta-list > li.rm-modal-meta-row {
    list-style: none !important;
    list-style-type: none !important;
}

.rm-modal--rm-event .rm-modal-meta-list > li.rm-modal-meta-row::marker {
    content: none;
}

/* RM-værter: header som DESCRIPTION + kvadratiske thumbs (kun RM-event/opgave i modal) */
.rm-modal--rm-event .rm-modal-rm-hosts-section.rm-modal-description-wrap {
    margin-top: 20px;
}

.rm-modal--rm-event .rm-modal-rm-hosts-section .rm-modal-rm-hosts {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 20px;
    margin: 0;
    padding: 0;
    align-items: flex-start;
}

.rm-modal--rm-event .rm-modal-rm-host-item {
    flex: 0 0 auto;
    min-width: 0;
}

.rm-modal--rm-event .rm-modal-rm-host-link {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    max-width: 120px;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.15s ease;
}

.rm-modal--rm-event .rm-modal-rm-host-link:hover,
.rm-modal--rm-event .rm-modal-rm-host-link:focus {
    opacity: 0.88;
    outline: none;
}

.rm-modal--rm-event .rm-modal-rm-host-link .rm-modal-rm-host-name {
    text-decoration: underline;
    text-decoration-color: rgba(241, 69, 155, 0.45);
    text-underline-offset: 2px;
}

.rm-modal--rm-event .rm-modal-rm-host-thumb-wrap {
    display: block;
    width: 56px;
    height: 56px;
    border-radius: 6px;
    overflow: hidden;
    background: #ececec;
    flex-shrink: 0;
}

.rm-modal--rm-event .rm-modal-rm-host-thumb {
    display: block;
    width: 56px;
    height: 56px;
    object-fit: cover;
}

.rm-modal--rm-event .rm-modal-rm-host-thumb--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #f3b8d4 0%, #e8e8e8 100%);
}

.rm-modal--rm-event .rm-modal-rm-host-name {
    font-size: 13px;
    font-weight: 800;
    line-height: 1.25;
    color: #111;
    word-break: break-word;
}

.rm-modal--rm-event .rm-modal-meta-row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 12px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
    color: #111;
}

.rm-modal--rm-event .rm-modal-meta-row:last-child {
    margin-bottom: 0;
}

.rm-modal--rm-event .rm-modal-meta-icon--img {
    flex-shrink: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    width: 24px;
    margin-top: 1px;
}

.rm-modal--rm-event .rm-modal-meta-icon__img {
    display: block;
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.rm-modal--rm-event .rm-modal-meta-icon__img--accent {
    filter: brightness(0) saturate(100%) invert(27%) sepia(85%) saturate(5500%) hue-rotate(300deg) brightness(96%) contrast(96%);
}

.rm-modal--rm-event .rm-modal-meta-text {
    flex: 1;
    min-width: 0;
}

.rm-modal--rm-event .rm-modal-meta-row--rsvp .rm-modal-meta-text,
.rm-modal--rm-event .rm-modal-meta-row--rsvp .rm-modal-meta-text strong {
    color: #f1459b;
}

.rm-modal--rm-event .rm-modal-extra-line {
    margin: 8px 0;
    font-size: 15px;
    line-height: 1.5;
    color: #222;
}

.rm-modal--rm-event .rm-modal-extra-line strong {
    color: #111;
    font-weight: 800;
}

.rm-modal--rm-event .rm-modal-description-wrap {
    margin-top: 20px;
}

.rm-modal--rm-event .rm-modal-description-head-block {
    display: inline-block;
    max-width: 100%;
    vertical-align: top;
}

.rm-modal--rm-event .rm-modal-description-heading {
    margin: 0 0 4px;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #111;
    padding: 0;
    border: none;
    display: block;
}

.rm-modal--rm-event .rm-modal-description-heading strong {
    font-weight: 900;
}

/* Pink kun under ordets bredde; sort linje fuld kolonne (design Group) */
.rm-modal--rm-event .rm-modal-description-pink-bar {
    height: 3px;
    width: 100%;
    background: #f1459b;
}

.rm-modal--rm-event .rm-modal-description-black-bar {
    height: 1px;
    width: 100%;
    margin: 0 0 14px;
    background: #000;
}

.rm-modal--rm-event .rm-event-description-text {
    font-size: 15px;
    line-height: 1.6;
    color: #222;
}

.rm-modal--rm-event .rm-event-description-text p {
    margin: 0 0 0.75em;
}

.rm-modal--rm-event .rm-event-description-text p:last-child {
    margin-bottom: 0;
}

.rm-modal--rm-event .rm-modal-description-wrap--task .rm-modal-task-short-heading,
.rm-modal--rm-event .rm-modal-description-wrap--task .rm-modal-body-description-heading {
    margin: 14px 0 6px;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #111;
}

.rm-modal--rm-event .rm-modal-description-wrap--task .rm-modal-task-short-heading:first-of-type {
    margin-top: 10px;
}

.rm-modal--rm-event .rm-modal-description-wrap--task .rm-modal-task-short-body {
    margin: 0 0 4px;
    font-size: 15px;
    line-height: 1.55;
    color: #222;
}

.rm-modal--rm-event .rm-event-description-text--after-task {
    margin-top: 0;
}

/* RSVP column */
.rm-modal--rm-event .rm-response-section {
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
}

.rm-modal--rm-event .rm-comment-section {
    margin-top: 0;
}

.rm-modal--rm-event .rm-comment-section label {
    font-size: 13px;
    font-weight: 700;
    color: #333;
}

.rm-modal--rm-event .rm-response-cta-heading {
    margin: 16px 0 12px;
    font-size: 14px;
    font-weight: 800;
    font-family: "Raleway", Arial, sans-serif;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #111;
    line-height: 1.2;
}

.rm-modal--rm-event .rm-response-buttons {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-bottom: 0;
}

.rm-modal--rm-event .rm-response-buttons .rm-response-btn {
    flex: 0 0 auto !important;
}

.rm-modal--rm-event .rm-response-buttons button.rm-response-btn,
.rm-modal--rm-event .rm-response-btn.rm-response-yes,
.rm-modal--rm-event .rm-response-btn.rm-response-no {
    flex: 0 0 auto;
    border-radius: 10px;
    font-family: "Raleway", Arial, sans-serif;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 13px;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: var(--rm-modal-figma-drop-shadow);
    padding: 10px 22px;
    appearance: none;
    -webkit-appearance: none;
}

.rm-modal--rm-event .rm-response-btn:hover {
    transform: none;
    box-shadow: var(--rm-modal-figma-drop-shadow);
    border: 0 !important;
}

.rm-modal--rm-event .rm-response-yes {
    background: #f1459b;
    color: #111;
}

.rm-modal--rm-event .rm-response-yes:hover {
    background: #e0107a;
    color: #fff;
    border: 0 !important;
}

.rm-modal--rm-event .rm-response-no {
    background: rgba(243, 184, 212, 0.55);
    color: #111;
}

.rm-modal--rm-event .rm-response-no:hover {
    background: rgba(241, 69, 155, 0.3);
    border: 0 !important;
}

.rm-modal--rm-event .rm-response-btn.active {
    box-shadow: var(--rm-modal-figma-drop-shadow);
    border: 0 !important;
    outline: 0 !important;
    transform: none;
}

.rm-modal--rm-event .rm-response-btn.active.rm-response-yes {
    background: #111;
    color: #fff;
    border: 0 !important;
}

.rm-modal--rm-event .rm-response-btn.active.rm-response-no {
    background: #333;
    color: #fff;
    border: 0 !important;
}

.rm-modal--rm-event .rm-event-comment {
    border-radius: 10px;
    border: none;
    outline: none;
    box-shadow: var(--rm-modal-figma-drop-shadow);
    font-family: "Raleway", Arial, sans-serif;
    font-size: 14px;
}

.rm-modal--rm-event .rm-event-comment:focus {
    border: none;
    box-shadow: 0 0 0 2px rgba(241, 69, 155, 0.35), var(--rm-modal-figma-drop-shadow);
}

.rm-modal--rm-event .rm-login-required--modal {
    margin: 0;
    padding: 16px;
    font-size: 14px;
}

/* Efter RSVP: inline bekræftelse (erstatter grøn toast), evt. kalender kun ved accept + dato */
.rm-modal--rm-event .rm-modal-body.has-rm-response-confirm > :not(.rm-modal-response-confirm) {
    display: none !important;
}

.rm-modal--rm-event .rm-modal-response-confirm {
    padding: 4px 2px 8px;
    text-align: left;
}

/* Stor linje = samme udtryk som .rm-modal-event-title (tasktitel i modal) */
.rm-modal--rm-event .rm-modal-response-confirm__headline {
    margin: 0 0 10px;
    font-size: clamp(24px, 2.8vw, 38px);
    font-weight: 900;
    line-height: 1.1;
    font-family: "Raleway", Arial, sans-serif;
    text-transform: uppercase;
    color: #111;
    letter-spacing: -0.02em;
}

/* Task-/eventtitel som undertitel: extra bold 14 */
.rm-modal--rm-event .rm-modal-response-confirm__subtitle {
    margin: 0 0 18px;
    font-size: 14px;
    font-weight: 900;
    line-height: 1.35;
    font-family: "Raleway", Arial, sans-serif;
    text-transform: uppercase;
    color: #111;
    letter-spacing: -0.01em;
}

.rm-modal--rm-event .rm-modal-response-confirm__body .rm-modal-response-confirm__line {
    margin: 0 0 10px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.5;
    color: #222;
}

.rm-modal--rm-event .rm-modal-response-confirm__body .rm-modal-response-confirm__line:last-child {
    margin-bottom: 0;
}

.rm-modal--rm-event .rm-modal-response-confirm__calendar {
    margin: 24px 0 0;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.rm-modal--rm-event .rm-modal-response-confirm__calendar-label {
    margin: 0 0 10px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: #111;
}

.rm-modal--rm-event .rm-modal-response-confirm__calendar-help {
    margin: 12px 0 0;
    font-size: 12px;
    line-height: 1.45;
    font-weight: 500;
    color: rgba(0, 0, 0, 0.62);
    max-width: 36em;
}

.rm-modal--rm-event .rm-modal-response-confirm__calendar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.rm-modal--rm-event .rm-modal-response-confirm__cal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-decoration: none;
    cursor: pointer;
    border: none;
    outline: none;
    background: #f3b8d4;
    color: #111;
    font-family: "Raleway", Arial, sans-serif;
    box-shadow: var(--rm-modal-figma-drop-shadow);
    transition: background 0.15s ease, filter 0.15s ease;
}

.rm-modal--rm-event a.rm-modal-response-confirm__cal-btn {
    color: #111;
}

.rm-modal--rm-event .rm-modal-response-confirm__cal-btn:hover {
    background: #f0a8ca;
    color: #111;
}

.rm-modal--rm-event .rm-modal-response-confirm__cal-btn:focus-visible {
    outline: 2px solid #f1459b;
    outline-offset: 2px;
}

.rm-modal--rm-event .rm-modal-response-confirm__close {
    margin-top: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 132px;
    padding: 12px 26px;
    border: none;
    outline: none;
    border-radius: 10px;
    background: #f1459b;
    color: #111;
    font-family: "Raleway", Arial, sans-serif;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: var(--rm-modal-figma-drop-shadow);
    transition: background 0.15s ease, color 0.15s ease;
}

.rm-modal--rm-event .rm-modal-response-confirm__close:hover {
    background: #e0107a;
    color: #fff;
}

.rm-modal--rm-event .rm-modal-response-confirm__close:focus-visible {
    outline: 2px solid #111;
    outline-offset: 2px;
}

@media (max-width: 768px) {
    .rm-modal--rm-event .rm-modal-event-details {
        grid-template-columns: 1fr;
    }

    .rm-modal--rm-event .rm-modal-event-left,
    .rm-modal--rm-event .rm-modal-event-media {
        max-width: 100%;
    }

    .rm-modal--rm-event .rm-event-stats--on-image {
        left: 10px;
        right: -10px;
        transform: translateY(-42%);
    }

    .rm-modal--rm-event .rm-event-stats--on-image.rm-event-stats--task-volunteers {
        left: auto;
        right: -12px;
    }

    .rm-modal--rm-event .rm-modal-gallery__frame,
    .rm-modal--rm-event .rm-modal-event-image {
        height: auto;
        min-height: 200px;
        max-height: none;
        aspect-ratio: 373 / 263;
    }

    .rm-modal--rm-event .rm-modal-event-image.rm-modal-event-image--task,
    .rm-modal--rm-event .rm-modal-gallery.rm-modal-gallery--task .rm-modal-gallery__frame {
        aspect-ratio: unset;
        max-height: min(65vh, 400px);
    }
}

/* ==========================================================
   [rm_tasks_search_advanced] — ROLE MODEL TASK (horisontale kort)
   ========================================================== */
.rm-events-advanced-page--rm-tasks {
    --h5g-task-card-shadow: 4px 4px 4px 0 rgba(0, 0, 0, 0.17);
    --h5g-task-visual-pink: #f3b8d4;
    --h5g-task-navy: #190d68;
    /* Kort: #F3B8D4 @ 15 % | Pille-fill: @ 80 % */
    --h5g-task-card-bg: rgba(243, 184, 212, 0.15);
    --h5g-task-pill-fill: rgba(243, 184, 212, 0.8);
}

.rm-events-advanced-page--rm-tasks .rm-events-grid {
    display: grid !important;
    align-items: stretch !important;
    justify-items: stretch !important;
}

/* Direkte børn = kort (undgår at tema/andre regler bryder række-stræk). */
.rm-events-advanced-page--rm-tasks .rm-events-grid > .rm-event-card.h5g-rm-task-card,
.rm-events-advanced-page--rm-tasks .rm-events-grid > .h5g-rm-task-card {
    display: flex !important;
    flex-direction: column !important;
    max-width: none !important;
    width: 100% !important;
    /* height:100% på grid-item kan forhindre at JS min-height får alle kort til at matche — brug auto + stretch */
    height: auto !important;
    min-height: auto !important;
    align-self: stretch !important;
    justify-self: stretch !important;
}

/* JS-filtrering (by-piller): .hidden skal slå flex !important — ellers vises alle kort uanset valg. */
.rm-events-advanced-page--rm-tasks .rm-events-grid > .rm-event-card.h5g-rm-task-card.hidden,
.rm-events-advanced-page--rm-tasks .rm-events-grid > .h5g-rm-task-card.hidden {
    display: none !important;
}

/* Indre boks vokser med kortet når grid strækker rækken (tema kan ellers overskrive flex). */
.rm-events-advanced-page--rm-tasks .rm-events-grid > .h5g-rm-task-card > .h5g-rm-task-card__inner {
    flex: 1 1 auto !important;
    min-height: 220px;
    width: 100%;
    align-self: stretch;
}

.h5g-rm-task-card {
    box-sizing: border-box;
    position: relative;
    overflow: visible;
    cursor: pointer;
    /* Afstand så halve pillehøjde kan stikke op uden at klippe; bruges til status-row top */
    --h5g-task-card-pad-top: 20px;
    padding-top: var(--h5g-task-card-pad-top);
    margin: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

.h5g-rm-task-card:focus-visible {
    outline: 2px solid #f1459b;
    outline-offset: 3px;
}

.h5g-rm-task-card__inner {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    flex: 1 1 auto;
    width: 100%;
    min-height: 260px;
    border-radius: var(--rm-adv-radius, 10px);
    overflow: hidden;
    background: var(--h5g-task-card-bg, rgba(243, 184, 212, 0.15));
    box-shadow: var(--h5g-task-card-shadow, 4px 4px 4px 0 rgba(0, 0, 0, 0.17));
    transition: box-shadow 0.2s ease;
}

.h5g-rm-task-card:hover .h5g-rm-task-card__inner {
    box-shadow: 4px 5px 10px 0 rgba(0, 0, 0, 0.18);
}

.h5g-rm-task-card__visual {
    flex: 0 0 48%;
    max-width: 320px;
    min-width: 160px;
    background: var(--h5g-task-visual-pink, #f3b8d4);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: stretch;
    text-align: left;
    box-sizing: border-box;
}

.h5g-rm-task-card__visual:has(.h5g-rm-task-card__visual-cover-wrap) {
    background: #ffffff;
    padding: 0;
}

/* Oversigt: kvadrat giver mere synlig højde end 4∶3 i smal kolonne; cover + max-height undgår kæmpe kort på brede skærme */
.h5g-rm-task-card__visual-img-wrap {
    flex: 0 0 auto;
    align-self: stretch;
    display: block;
    margin: 6px 8px;
    padding: 0;
    width: auto;
    max-width: 100%;
    box-sizing: border-box;
    aspect-ratio: 1 / 1;
    max-height: min(280px, 72vw);
    overflow: hidden;
    border-radius: 8px;
}

.h5g-rm-task-card__visual-img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: cover;
    object-position: center;
}

.h5g-rm-task-card__body {
    flex: 1;
    min-width: 0;
    min-height: 0;
    position: relative;
    padding: 48px 16px 18px 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-sizing: border-box;
}

/*
 * VOLUNTEERS / COMMITTED: sidder på kortets øverste kant (__inner).
 * top = samme som card padding-top → midten af pillerne = korttop → halvdelen op.
 * right: negativ med samme værdi som pad-top (+ 4px ind mod kort) så piller ikke rammer nabokort.
 */
.h5g-rm-task-card__status-row {
    position: absolute;
    z-index: 4;
    top: var(--h5g-task-card-pad-top, 20px);
    left: auto;
    right: calc(-1 * var(--h5g-task-card-pad-top, 20px) + 4px);
    width: auto;
    max-width: calc(100% + var(--h5g-task-card-pad-top, 20px));
    margin: 0;
    padding: 0;
    transform: translateY(-50%);
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
    align-items: stretch;
    justify-content: flex-end;
    pointer-events: none;
    box-sizing: border-box;
}

.h5g-rm-task-card__status-pill {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.35em;
    padding: 6px 9px 6px 11px;
    border-radius: 10px;
    border: none;
    background: var(--h5g-task-pill-fill, rgba(243, 184, 212, 0.8));
    box-shadow: var(--h5g-task-card-shadow, 4px 4px 4px 0 rgba(0, 0, 0, 0.17));
    white-space: nowrap;
}

.h5g-rm-task-card__status-pill--volunteers {
    color: rgba(0, 0, 0, 0.65);
}

.h5g-rm-task-card__status-pill--committed {
    color: #000000;
}

.h5g-rm-task-card__status-pill--allset {
    color: #000000;
}

.h5g-rm-task-card__status-text,
.h5g-rm-task-card__status-num {
    font-family: "Raleway", Arial, sans-serif;
    font-size: clamp(9px, 2.4vw, 11px);
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    line-height: 1.2;
    color: inherit;
}

.h5g-rm-task-card__title {
    margin: 0;
    padding-top: 0;
    font-family: "Raleway", Arial, sans-serif;
    font-size: clamp(14px, 1.6vw, 17px);
    font-weight: 900;
    line-height: 1.2;
    text-transform: uppercase;
    color: #111;
}

.h5g-rm-task-card__meta {
    font-family: "Raleway", Arial, sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #555;
}

.h5g-rm-task-card__meta-location {
    font-weight: 900;
    color: #111;
}

.h5g-rm-task-card__meta-date {
    font-weight: 600;
    color: #666;
}

.h5g-rm-task-card__field {
    font-family: "Raleway", Arial, sans-serif;
    font-size: 12px;
    line-height: 1.35;
    color: #444;
    flex-shrink: 0;
}

/* Reserver én linjes højde når branche mangler, så kort med/uden FIELD ikke hopper i grid. */
.h5g-rm-task-card__field--empty {
    min-height: calc(12px * 1.35);
    margin: 0;
}

.h5g-rm-task-card__field-label {
    font-weight: 900;
    color: #111;
}

.h5g-rm-task-card__field-value {
    font-weight: 500;
    color: #444;
}

.h5g-rm-task-card__desc {
    flex: 1 1 auto;
    min-height: 0;
    font-family: "Raleway", Arial, sans-serif;
    font-size: 13px;
    line-height: 1.45;
    color: #333;
    overflow: hidden;
}

.h5g-rm-task-card__desc p {
    margin: 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 5;
    line-clamp: 5;
}

.h5g-rm-task-card__rsvp {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    padding-top: 6px;
    font-family: "Raleway", Arial, sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #111;
}

.h5g-rm-task-card__rsvp-icon {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    display: block;
    object-fit: contain;
}

@media (max-width: 640px) {
    .h5g-rm-task-card__inner {
        flex-direction: column;
    }

    .h5g-rm-task-card__visual {
        flex: 0 0 auto;
        max-width: none;
        min-height: 0;
    }

    .h5g-rm-task-card__status-row {
        right: calc(-1 * var(--h5g-task-card-pad-top, 20px) + 4px);
        max-width: calc(100% + var(--h5g-task-card-pad-top, 20px));
        justify-content: flex-end;
    }

    .h5g-rm-task-card__visual-img-wrap {
        max-width: min(100%, 400px);
        max-height: min(320px, 85vw);
        margin: 10px 12px;
    }
}

/* =============================================================================
 * Univers-kort + kalender (rm-overview): målgruppe-pills og layout for ALLE
 * domæner. Tidligere lå en del kun i rm-events-display-newsite.css — derfor
 * så mainsite (fx high5girls.dk) ingen ændring ved kun at rette .h5g-rm-card.
 * ============================================================================= */

.univers-event-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 8px;
    justify-content: flex-end;
    align-self: flex-end;
    margin-left: auto;
    margin-bottom: 12px;
    max-width: 100%;
}

.rm-overview-card-event-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 8px;
    margin-bottom: 8px;
}

.rm-event-badge.rm-audience-badge {
    background: #f3b8d4;
    color: #111;
    border-color: rgba(0, 0, 0, 0.06);
    box-shadow: none;
    backdrop-filter: none;
    border-radius: 10px;
    cursor: default;
    pointer-events: none;
    font-weight: 800;
    justify-content: center;
    align-items: center;
    min-height: 30px;
    padding: 7px 12px;
    width: max-content;
    max-width: calc(100% - 30px);
    overflow-wrap: break-word;
    word-break: break-word;
}

.rm-event-badge.rm-audience-badge .badge-text {
    color: #111;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.02em;
    line-height: 1.3;
    text-align: center;
    white-space: normal;
}

.rm-event-badge.rm-audience-badge:hover {
    transform: none;
    box-shadow: none;
}

.univers-event-card-tag.h5g-audience-pill,
.rm-overview-card-event-tag.h5g-audience-pill {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 7px 12px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.02em;
    line-height: 1.3;
    text-transform: uppercase;
    color: #111;
    border-radius: 10px;
    width: max-content;
    max-width: 100%;
    overflow-wrap: break-word;
    word-break: break-word;
    text-align: center;
    background: #f3b8d4;
}

.rm-modal-header .rm-event-badge.rm-audience-badge {
    background: #f3b8d4 !important;
    color: #111 !important;
    border-color: rgba(0, 0, 0, 0.06) !important;
    box-shadow: none !important;
    border-radius: 10px;
    cursor: default;
    pointer-events: none;
}

.rm-modal-header .rm-event-badge.rm-audience-badge .badge-text {
    color: #111 !important;
    white-space: normal !important;
}

/* Kalender (layout=univers): luft målgruppe → titel; beskrivelse fylder; LÆS MERE i bund */
.kalender-events.rm-overview-cards-section .rm-overview-card--event .rm-overview-card-link {
    height: 100%;
}

.kalender-events.rm-overview-cards-section .rm-overview-card--event .rm-overview-card-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 260px;
}

.kalender-events.rm-overview-cards-section .rm-overview-card--event .rm-overview-card-event-tags {
    margin-bottom: 14px;
}

.kalender-events.rm-overview-cards-section .rm-overview-card--event .rm-overview-card-name {
    margin-top: 2px;
    margin-bottom: 12px;
}

.kalender-events.rm-overview-cards-section .rm-overview-card--event .rm-overview-card-desc {
    flex: 1 1 auto;
    min-height: 0;
    margin-bottom: 0;
    -webkit-line-clamp: 5;
    line-clamp: 5;
}

.kalender-events.rm-overview-cards-section .rm-overview-card--event .rm-overview-card-event-btn {
    margin-top: auto;
    align-self: flex-start;
}
