/* Route Manager Public Styles */

/* Celebration Message */
.congratulations {
    color: #2ecc71;
    text-align: center;
    font-size: 1.8em;
    margin-bottom: 15px;
    animation: bounce 1s ease infinite;
}

/* Mobile-friendly registration/check-in forms */
@media (max-width: 768px) {
    /* So the card stays comfy on mobile */
    .rm-form { padding: 20px; }

    /* Put label above input */
    .rm-form-row {
        grid-template-columns: 1fr; /* single column */
        align-items: stretch;
        gap: 6px 0;
        margin-bottom: 14px;
    }
    .rm-col-label { text-align: left; }
    .rm-col-label label { display: block; }

    /* Inputs should span full width and not be cut off */
    .rm-col-input { padding-right: 0; }
    .rm-col-input input:not([type="checkbox"]):not([type="radio"]),
    .rm-col-input select,
    .rm-col-input textarea {
        max-width: none;
        width: 100%;
        box-sizing: border-box; /* include padding in width */
    }

    /* Check-in form groups: ensure label above field and full-width controls */
    #checkin-form .rm-form-group label { margin-bottom: 6px; }
    #checkin-form .rm-form-group input,
    #checkin-form .rm-form-group select,
    #checkin-form .rm-form-group textarea {
        width: 100%;
        box-sizing: border-box;
    }
}

.completion-message {
    text-align: center;
    font-size: 1.2em;
    color: #2c3e50;
    margin-bottom: 20px;
}

.medal-instructions {
    background-color: #f8f9fa;
    border-left: 4px solid #f1c40f;
    padding: 15px;
    margin: 20px 0;
    border-radius: 0 4px 4px 0;
}

.medal-title {
    color: #d4ac0d;
    margin-top: 0;
    font-size: 1.3em;
}

.medal-text {
    margin-bottom: 0;
    line-height: 1.6;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* Detail rows - used for displaying key-value pairs */
.rm-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.rm-detail-row:last-child {
    border-bottom: none;
}

.rm-detail-label {
    font-weight: 600;
    color: #444;
}

.rm-detail-value {
    color: #2c3e50;
    font-weight: 500;
}

/* Responsive adjustments for detail rows */
@media (max-width: 600px) {
    .rm-detail-row {
        flex-direction: column;
    }
    
    .rm-detail-value {
        margin-top: 4px;
    }
}


/* Route Info Component */
.rm-route-info .rm-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 25px;
    margin-bottom: 25px;
    border: 1px solid #e0e0e0;
    border-left: 4px solid #4a90e2;
}

.rm-route-description {
    line-height: 1.6;
    color: #333;
}
.rm-route-description:after { content: ""; display: block; clear: both; }
.rm-route-description .alignleft,
.rm-route-description img.alignleft,
.rm-route-description figure.alignleft { float: left; margin: 0 1em 1em 0; }
.rm-route-description .alignright,
.rm-route-description img.alignright,
.rm-route-description figure.alignright { float: right; margin: 0 0 1em 1em; }
.rm-route-description .aligncenter,
.rm-route-description img.aligncenter,
.rm-route-description figure.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.rm-route-description strong,
.rm-route-description b {
    font-weight: 700 !important;
}

/* Ensure images inserted via Media Library in route public descriptions scale nicely */
.rm-route-description img {
    max-width: 100%;
    height: auto;
    display: block;
}
.rm-route-description figure {
    margin: 1em auto;
}
.rm-route-description figcaption {
    text-align: center;
    color: #666;
    font-size: 0.95em;
}

#rm-track-description img { max-width: 100%; height: auto; }
#rm-track-description:after { content: ""; display: block; clear: both; }
#rm-track-description .alignleft,
#rm-track-description img.alignleft,
#rm-track-description figure.alignleft { float: left; margin: 0 1em 1em 0; }
#rm-track-description .alignright,
#rm-track-description img.alignright,
#rm-track-description figure.alignright { float: right; margin: 0 0 1em 1em; }
#rm-track-description .aligncenter,
#rm-track-description img.aligncenter,
#rm-track-description figure.aligncenter { display: block; margin-left: auto; margin-right: auto; }

.rm-route-description p:first-child {
    margin-top: 0;
}

.rm-route-description p:last-child {
    margin-bottom: 0;
}

.rm-route-details {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    background: #f9f9f9;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 30px;
}

.rm-details-title {
    margin: 0 0 15px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #e0e0e0;
    color: #2c3e50;
    font-size: 1.2em;
}

.rm-details-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.rm-details-list li {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.rm-details-list li:last-child {
    border-bottom: none;
}

.rm-detail-label {
    font-weight: 600;
    color: #444;
}

.rm-detail-value {
    color: #2c3e50;
    font-weight: 500;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .rm-route-info .rm-card {
        padding: 15px;
    }
    
    .rm-route-details {
        padding: 15px;
    }
    
    .rm-details-list li {
        flex-direction: column;
    }
    
    .rm-detail-value {
        margin-top: 4px;
    }
}


.rm-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Numbered checkpoint markers */
.rm-cp-marker {
    background: #0066cc;
    color: #fff;
    border-radius: 16px;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    font-weight: 700;
    font-size: 12px;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.25);
}

/* Pills for Start/Finish in table */
.rm-pill {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    line-height: 1.4;
    margin-left: 8px;
}
.rm-pill.start { background: #e6f4ff; color: #055ea8; }
.rm-pill.finish { background: #e8f5e9; color: #1b5e20; }
.rm-pill.both { background: #f3e8ff; color: #6a1b9a; }

/* Base Card Styles */
.rm-checkpoint-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 25px;
    margin-bottom: 25px;
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
    border-left: 4px solid #4a90e2; /* Default blue border */
    position: relative;
    overflow: hidden;
}

/* Check-in Card (initial state) */
.rm-checkin-card {
    border-left-color: #4a90e2; /* Blue border for check-in */
}

/* Success Card */
.rm-success-card {
    border-left-color: #4caf50; /* Green border for success */
    background-color: #f8f9fa;
}

/* Next Checkpoint Card */
.rm-next-checkpoint {
    border-left-color: #4a90e2; /* Blue border for next checkpoint */
    background-color: #f8f9fa;
    animation: fadeIn 0.5s ease-in-out;
    margin-top: 20px;
    transition: all 0.3s ease;
}

/* Card hover effect */
.rm-checkpoint-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Success message styling */
.rm-success-card .rm-message {
    color: #2e7d32;
    font-size: 1.1em;
    line-height: 1.6;
    margin: 10px 0 0;
}

/* Form elements in cards */
.rm-checkin-card .rm-form-group {
    margin-bottom: 20px;
}

/* Loading spinner */
button .spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .rm-checkpoint-card {
        padding: 20px 15px;
    }
    
    .rm-checkpoint-card h3 {
        font-size: 1.2em;
    }
}

.rm-checkpoint-card h3 {
    margin-top: 0;
    color: #2c3e50;
    border-bottom: 1px solid #eee;
    padding-bottom: 12px;
    margin-bottom: 18px;
    font-size: 1.4em;
}

.rm-checkpoint-card h4 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 1.2em;
}

.rm-checkpoint-description {
    color: #555;
    line-height: 1.6;
    transition: all 0.3s ease;
    max-height: 1000px;
    overflow: hidden;
    font-size: 1.05em;
}

.rm-checkpoint-description p:last-child {
    margin-bottom: 0;
}

/* Success state */
#success-container .rm-checkpoint-card {
    background-color: #f8f9fa;
    border-left: 4px solid #4caf50;
    animation: fadeIn 0.5s ease-in-out;
}

#success-container .rm-checkpoint-card.success {
    background-color: #e8f5e9;
    border-left: 4px solid #4caf50;
}

#next-checkpoint-success {
    background-color: #f8f9fa;
    border-left: 4px solid #2196f3;
}

#next-checkpoint-success h3 {
    color: #1565c0;
}

.rm-message {
    padding: 15px 20px;
    margin: 15px 0 25px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 1.05em;
    line-height: 1.5;
}

.rm-message.success {
    background-color: #e8f5e9;
    color: #1b5e20;
    border-left: 4px solid #4caf50;
    padding: 15px 20px;
}

.rm-message.error {
    background-color: #ffebee;
    color: #b71c1c;
    border-left: 4px solid #f44336;
    padding: 15px 20px;
}

/* Success container */
#success-container {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

/* Check-in button */
#new-checkin-btn {
    width: 100%;
    padding: 12px 20px;
    font-size: 1.1em;
    font-weight: 600;
    background-color: #2196f3;
    border: none;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 15px;
}

#new-checkin-btn:hover {
    background-color: #1976d2;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#new-checkin-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Next checkpoint highlight */
#next-checkpoint {
    background-color: #f0f7ff;
    border-left-color: #4a90e2;
    display: none; /* Hidden by default */
}

/* Form styles */

/* Wider layout specifically for the protected track details page */
.rm-container.rm-track-details {
    max-width: 1100px;
}

/* Keep the initial verify card reasonably narrow and centered */
.rm-track-details .rm-form.rm-card {
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

/* --- Track Details: Cards, Accordion, Map, Tables --- */
.rm-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    padding: 20px;
    margin: 20px 0;
}

/* Accordion visual connection between header and content */
.rm-accordion .rm-acc-item {
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    margin-bottom: 10px;
    overflow: hidden;
}
.rm-accordion .rm-acc-header {
    width: 100%;
    text-align: left;
    background: #f8fafc;
    padding: 14px 16px;
    border: 0;
    cursor: pointer;
    font-size: 17px; /* larger than table headers */
    font-weight: 600;
    position: relative;
}
.rm-accordion .rm-acc-header::after {
    content: '▸';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.6;
}
.rm-accordion .rm-acc-item.open .rm-acc-header::after { content: '▾'; opacity: 0.9; }
.rm-accordion .rm-acc-item.open .rm-acc-header {
    border-bottom: 1px solid #e5e7eb;
}
.rm-accordion .rm-acc-content {
    padding: 12px;
}

/* Actions spacing below download buttons */
.rm-form-actions {
    margin-bottom: 30px;
}

.rm-track-map-wrap { position: relative; }
.rm-track-map {
    height: 437px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #e1e1e1;
}
#rm-track-map-error { margin-top: 10px; }

/* Reusable table style similar to results table */
.rm-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid #e1e1e1;
}
.rm-table th,
.rm-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #eaeaea;
    text-align: left;
}
.rm-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}
.rm-table tbody tr:nth-child(even) { background: #fbfbfb; }

.rm-cp-table { margin-top: 6px; }

/* Results shortcode: full-width layout and smaller font */
.rm-container.route-manager-results.shortcode-results {
    max-width: none;
    padding: 10px 16px;
    font-size: 14px;
}

.route-manager-results.shortcode-results .rm-header h2 {
    margin: 0 0 8px 0;
    font-size: 19px;
}

.rm-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e1e1e1;
}

.rm-header h1 {
    color: #333;
    margin-bottom: 10px;
}

.rm-header h2 {
    color: #666;
    font-weight: normal;
}

.rm-content {
    margin-bottom: 30px;
}

.rm-checkpoint-description,
.rm-route-description {
    padding: 15px;
    border-radius: 5px;
}

.rm-form {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.rm-form-row {
    display: grid;
    grid-template-columns: 220px 1fr; /* label | input */
    align-items: center;
    gap: 12px 20px;
    margin-bottom: 16px;
}

.rm-col-label {
    text-align: right;
}

.rm-col-label label {
    display: inline-block;
    font-weight: 600;
    color: #333;
}

.rm-col-input input:not([type="checkbox"]):not([type="radio"]),
.rm-col-input select,
.rm-col-input textarea {
    width: 100%;
    max-width: 420px; /* restore default control width */
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

/* add subtle right padding for the input column to match left visual padding */
.rm-col-input {
    padding-right: 25px; /* more breathing room on the right */
}

/* ensure right padding plays nicely without shrinking the visual field */
.rm-col-input input[type="text"],
.rm-col-input input[type="email"],
.rm-col-input input[type="tel"],
.rm-col-input select,
.rm-col-input textarea {
    box-sizing: content-box;
}

.rm-col-input textarea {
    max-width: none; /* billing full width */
    resize: none;    /* not resizable */
}

/* Billing label should be bold; checkbox labels remain normal */
.rm-col-input > label[for="rm-billing"] {
    font-weight: 600;
}

.rm-row-full {
    display: block;
}

.rm-row-full .rm-col-input {
    grid-column: 1 / -1; /* span both columns */
}

.rm-col-input .rm-inline-error {
    margin-top: 6px;
}

.rm-form-group {
    margin-bottom: 20px;
}

.rm-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.rm-form-group input,
.rm-form-group select,
.rm-form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

/* Display registration code as uppercase while typing */
#checkin-form #registration-code {
    text-transform: uppercase;
}

/* Keep placeholder normal casing */
#checkin-form #registration-code::placeholder { text-transform: none; }
#checkin-form #registration-code::-webkit-input-placeholder { text-transform: none; }
#checkin-form #registration-code::-moz-placeholder { text-transform: none; }
#checkin-form #registration-code:-ms-input-placeholder { text-transform: none; }
#checkin-form #registration-code::-ms-input-placeholder { text-transform: none; }

.rm-form-group input:focus,
.rm-form-group select:focus,
.rm-form-group textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 5px rgba(0,115,170,0.3);
}

.rm-form-actions {
    text-align: center;
    margin-top: 30px;
}

/* Split button dropdown */
.rm-split {
    display: inline-flex;
    position: relative;
}
.rm-split .rm-split-toggle {
    padding-left: 12px;
    padding-right: 12px;
    margin-left: 2px;
}
.rm-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-radius: 4px;
    min-width: 200px;
    z-index: 50;
}
.rm-dropdown .rm-dropdown-item {
    display: block;
    width: 100%;
    text-align: left;
    background: transparent;
    border: 0;
    padding: 10px 14px;
    cursor: pointer;
}
.rm-dropdown .rm-dropdown-item:hover {
    background: #f3f4f5;
}

/* Make split look like a single button */
.rm-split .rm-btn {
    border-radius: 4px 0 0 4px;
}
.rm-split .rm-split-toggle.rm-btn {
    border-radius: 0 4px 4px 0;
    margin-left: 0;
    border-left: 1px solid rgba(0,0,0,0.1);
    background-color: #1c89d2; /* slightly lighter than primary */
}
.rm-btn.rm-btn-primary {
    background-color: #0073aa;
    color: #fff;
}
.rm-btn.rm-btn-primary:hover { background-color: #006799; }

.rm-btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.3s;
}

.rm-btn-primary {
    background-color: #0073aa;
    color: white;
}

.rm-btn-primary:hover {
    background-color: #005a87;
}

.rm-message {
    padding: 15px;
    border-radius: 4px;
    margin: 20px 0;
}

.rm-message.success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.rm-message.error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* Registration form refinements */
.rm-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 768px) {
    .rm-grid-2 { grid-template-columns: 1fr; }
}

.rm-required {
    color: #d63638; /* WP error red */
}

.rm-field.invalid input,
.rm-field.invalid select,
.rm-field.invalid textarea,
.rm-col-input.invalid input,
.rm-col-input.invalid select,
.rm-col-input.invalid textarea {
    border-color: #d63638;
    background: #fff5f5;
}

.rm-inline-error {
    color: #d63638;
    font-size: 13px;
    margin-top: 6px;
}

/* Unified checkbox/radio styling */
.rm-check {
    display: flex;
    align-items: center; /* vertically align checkbox and label */
    gap: 20px;
    max-width: none; /* let label use remaining width */
    margin: 30px 20px; /* increased vertical spacing and side breathing room */
}
/* let the browser handle vertical centering of the checkbox */
.rm-check span {
    flex: 1 1 auto; /* label takes available width */
}
.rm-entry-fee-info {
    /* Center the fee info under the full-width row */
    margin-left: 0;
    text-align: center;
}
.rm-radio-group {
    display: flex;
    align-items: center;
}
.rm-radio-group .rm-radio {
    display: inline-flex;
    align-items: center;
}
.rm-radio-group .rm-radio input[type="radio"] {
    margin-right: 6px;
}

.rm-results-table-wrapper {
    overflow-x: auto;
    margin: 20px 0;
}

.rm-results-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.rm-results-table th,
.rm-results-table td {
    padding: 8px 10px; /* keep spacing */
    text-align: left;
    border-bottom: 1px solid #e1e1e1;
}

.rm-results-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #333;
    font-size: 13.5px;
}

/* Subtle striping: white and very light gray */
.rm-results-table tbody tr:nth-child(odd) {
    background-color: #ffffff;
}
.rm-results-table tbody tr:nth-child(even) {
    background-color: #fbfbfb; /* very light gray */
}

.rm-results-table th.sortable {
    cursor: pointer;
    position: relative;
}

.rm-results-table th.sortable:hover {
    background-color: #e9ecef;
}

.rm-results-table th.sortable::after {
    content: '↕';
    position: absolute;
    right: 8px;
    opacity: 0.5;
}

.rm-results-table th.sorted-asc::after {
    content: '↑';
    opacity: 1;
}

.rm-results-table th.sorted-desc::after {
    content: '↓';
    opacity: 1;
}

.rm-results-table tbody tr:hover {
    background-color: #f8f9fa;
}

.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

/* Admin-only Public/Non-public indicator badges */
.rm-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
}
.rm-badge-public {
    background: #e6f4ea; /* soft green */
    color: #1e7e34;
    border: 1px solid #b7e0c2;
}
.rm-badge-private {
    background: #fdecea; /* soft red */
    color: #b71c1c;
    border: 1px solid #f5c6c6;
}

.status-pending {
    background-color: #fff3cd;
    color: #856404;
}

.status-approved {
    background-color: #d1ecf1;
    color: #0c5460;
}

.status-started {
    background-color: #cce5ff;
    color: #004085;
}

.status-completed {
    background-color: #d4edda;
    color: #155724;
}



.rm-no-results {
    text-align: center;
    padding: 40px;
    color: #666;
}

.rm-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #e1e1e1;
    color: #666;
}

.rm-footer a {
    color: #0073aa;
    text-decoration: none;
}

.rm-footer a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .rm-container {
        padding: 10px;
    }
    
    .rm-form {
        padding: 20px;
    }
    
    .rm-results-table {
        font-size: 14px;
    }
    
    .rm-results-table th,
    .rm-results-table td {
        padding: 8px;
    }
    /* Force registration/check-in form to single-column and full-width inputs on mobile/tablet */
    .rm-form-row {
        grid-template-columns: 1fr !important;
        align-items: stretch !important;
        gap: 6px 0 !important;
        margin-bottom: 14px !important;
    }
    .rm-col-label { text-align: left !important; }
    .rm-col-label label { display: block !important; }
    .rm-col-input { padding-right: 0 !important; }
    .rm-col-input input:not([type="checkbox"]):not([type="radio"]),
    .rm-col-input select,
    .rm-col-input textarea {
        max-width: none !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    /* Collapse utility 2-col grid */
    .rm-grid-2 { grid-template-columns: 1fr !important; }

    /* Hard override in case grid rules persist: force block flow */
    .rm-form .rm-form-row {
        display: block !important;
    }
    .rm-form .rm-form-row .rm-col-label,
    .rm-form .rm-form-row .rm-col-input {
        display: block !important;
        width: 100% !important;
    }
    .rm-form .rm-form-row .rm-col-label label {
        display: block !important;
        margin-bottom: 6px !important;
        text-align: left !important;
    }

    /* Center completion type radios (running/hiking) */
    .rm-radio-group {
        justify-content: center !important;
        gap: 14px !important;
    }
}

/* Routes Grid */
.rm-routes-grid .rm-grid {
    display: grid;
    grid-template-columns: repeat(var(--rm-grid-cols, 3), minmax(0, 1fr));
    gap: 18px;
}

@media (max-width: 1024px) {
    .rm-routes-grid .rm-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 640px) {
    .rm-routes-grid .rm-grid { grid-template-columns: repeat(1, minmax(0,1fr)); }
}

.rm-route-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(0,0,0,0.06);
    transition: transform .2s ease, box-shadow .2s ease;
}
.rm-route-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0,0,0,0.12);
}

.rm-route-card .rm-card-image {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f3f4f6;
}
.rm-route-card .rm-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
    transition: transform .35s ease;
    display: block;
}
.rm-route-card:hover .rm-card-image img {
    transform: scale(1.07);
}
.rm-route-card .rm-card-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-size: 38px; opacity: .35;
}

.rm-route-card .rm-card-body {
    padding: 14px 14px 16px;
    text-align: center;
}
.rm-route-card .rm-card-title {
    margin: 0 0 8px 0;
    font-size: 22px;
    font-weight: 700;
}
.rm-route-card .rm-card-teaser {
    margin: 0 0 10px 0;
    color: #555;
    font-size: 15px;
}
.rm-route-card .rm-card-cta {
    display: inline-block;
    margin-top: 6px;
    font-weight: 600;
    color: #0a66c2;
}

/* Widen the routes grid page container */
.rm-container.rm-routes-grid {
    max-width: 1200px;
}
