/* Wrapper for item + accordion */
.racer-item-wrapper {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 6px;
    margin-bottom: 8px;
    overflow: hidden; /* Contains the accordion */
}

/* The visible row */
.racer-item {
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    background: #fff; /* Ensure it sits on top */
}

/* The hidden accordion */
.racer-report-text {
    background: #f9f9f9;
    padding: 15px 20px;
    border-top: 1px solid #eee;
    font-size: 0.95em;
    color: #444;
}
.racer-report-text blockquote {
    margin: 0;
    font-style: italic;
    border-left: 3px solid #ccc;
    padding-left: 10px;
}

/* Toggle Button */
.toggle-report {
    cursor: pointer;
    background: #eef;
    border-color: #ccd;
    color: #446;
}
.toggle-report:hover {
    background: #dde;
}

/* Homepage teaser cards */
.mmtc-teasers {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin: 1.5rem 0 2.5rem;
}

.mmtc-teaser {
    background: #ffffff;
    border: 1px solid #e3e7ec;
    border-radius: 8px;
    padding: 14px 18px;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.04);
}

.mmtc-teaser-title {
    margin: 0 0 4px;
    font-size: 1.05rem;
}

.mmtc-teaser-meta {
    font-size: 0.9rem;
    color: #666;
}

.mmtc-teaser-badges {
    margin-top: 6px;
}

.mmtc-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.75rem;
    margin-right: 4px;
}

.mmtc-badge-tent {
    background: #e6f4ea;
    color: #1b5e20;
}

.mmtc-badge-tent-needed {
    background: #fff3e0;
    color: #e65100;
}

.mmtc-badge-count {
    background: #e3f2fd;
    color: #0d47a1;
}

.mmtc-badge-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 4px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #fff9c4, #fbc02d 55%, #f57f17 80%);
    box-shadow: 0 0 0 1px rgba(13, 71, 161, 0.3);
    vertical-align: -2px;
}

.mmtc-teaser-user {
    margin-top: 8px;
    font-size: 0.9rem;
}

.mmtc-teaser-logistics {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.mmtc-logistics-chip {
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.78rem;
    font-weight: 600;
    border: none;
    background: #e5e7eb;
    color: #374151;
    cursor: pointer;
}

.mmtc-logistics-chip:hover {
    background: #d1d5db;
}

/* Add-race inline card & controls */
.mmtc-add-race-bar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.mmtc-add-race-button {
    border: none;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 0.9rem;
    font-weight: 600;
    background: #005cbf;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(15,23,42,0.18);
}

.mmtc-add-race-button:hover {
    background: #004395;
}

.mmtc-teaser-add {
    border-style: dashed;
    border-color: #b8c2cc;
    background: #f8fafc;
}

.mmtc-teaser-add--hidden {
    display: none;
}

.mmtc-add-race-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
}

.mmtc-add-race-field {
    display: flex;
    flex-direction: column;
    flex: 1 1 140px;
}

.mmtc-add-race-field label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 4px;
}

.mmtc-add-race-field select,
.mmtc-add-race-field input {
    border-radius: 4px;
    border: 1px solid #cbd5e1;
    padding: 5px 8px;
    font-size: 0.85rem;
}

.mmtc-add-race-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.mmtc-add-race-submit,
.mmtc-add-race-cancel {
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
}

.mmtc-add-race-submit {
    background: #10b981;
    color: #0f172a;
}

.mmtc-add-race-submit:hover {
    background: #059669;
}

.mmtc-add-race-cancel {
    background: #e5e7eb;
    color: #4b5563;
}

.mmtc-add-race-cancel:hover {
    background: #d1d5db;
}

.mmtc-add-race-help {
    margin-top: 10px;
    font-size: 0.75rem;
    color: #6b7280;
}

/* Newly added race highlight */
.mmtc-teaser--new {
    box-shadow: 0 0 0 2px rgba(16,185,129,0.6), 0 6px 14px rgba(15,23,42,0.25);
}

/* Small popover for inline status/carpool/lodging */
.mmtc-popover {
    position: absolute;
    z-index: 9999;
    min-width: 190px;
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    box-shadow: 0 18px 45px rgba(15,23,42,0.35);
    padding: 6px 0;
    color: #111827;
}

.mmtc-popover--hidden {
    display: none;
}

.mmtc-popover-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mmtc-popover-item {
    margin: 0;
}

.mmtc-popover-option {
    width: 100%;
    text-align: left;
    border: none;
    background: transparent;
    padding: 8px 14px;
    font-size: 0.82rem;
    cursor: pointer;
    color: #111827;
}

.mmtc-popover-option:hover {
    background: #e5e7eb;
}

.mmtc-popover-option.is-current {
    font-weight: 600;
    background: #dbeafe;
    color: #1e40af;
}

.mmtc-pill {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    background: #e5e7eb;
    margin-right: 4px;
    font-size: 0.8rem;
}

.mmtc-pill-cta {
    background: #dcfce7;
    color: #166534;
}

.mmtc-pill-alert {
    background: #fee2e2;
    color: #b91c1c;
}

/* Make status pill clickable with proper cursor */
.mmtc-pick-status {
    cursor: pointer;
    transition: background 0.15s ease;
}

.mmtc-pick-status:hover {
    background: #d1d5db;
}

.mmtc-link {
    text-decoration: underline;
}

/* See more races link */
.mmtc-see-more-races {
    display: inline-block;
    padding: 6px 14px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #005cbf;
    text-decoration: none;
    border-radius: 20px;
    transition: background 0.15s ease;
}

.mmtc-see-more-races:hover {
    background: #e0f2ff;
    color: #004395;
}

/* Remove button in popover */
.mmtc-popover-item--remove {
    border-top: 1px solid #e5e7eb;
    margin-top: 4px;
    padding-top: 4px;
}

.mmtc-popover-option--remove {
    color: #dc2626;
    font-weight: 500;
}

.mmtc-popover-option--remove:hover {
    background: #fee2e2;
    color: #991b1b;
}

/* Add Race Form */
.mmtc-add-race-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.mmtc-add-race-form h2 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: #1a202c;
}

.mmtc-add-race-form .description {
    color: #718096;
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.mmtc-add-race-form .form-group {
    margin-bottom: 1.5rem;
}

.mmtc-add-race-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2d3748;
}

.mmtc-add-race-form .required {
    color: #e53e3e;
}

.mmtc-add-race-form select,
.mmtc-add-race-form input[type="date"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.mmtc-add-race-form select:focus,
.mmtc-add-race-form input[type="date"]:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

.mmtc-add-race-form select:disabled,
.mmtc-add-race-form input[type="date"]:disabled {
    background-color: #edf2f7;
    cursor: not-allowed;
    opacity: 0.6;
}

.mmtc-add-race-form .message {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    position: relative;
}

.mmtc-add-race-form .message.success {
    background-color: #c6f6d5;
    border: 1px solid #9ae6b4;
    color: #22543d;
}

.mmtc-add-race-form .message.error {
    background-color: #fed7d7;
    border: 1px solid #fc8181;
    color: #742a2a;
}

.mmtc-add-race-form .message p {
    margin: 0;
    padding-right: 2rem;
}

.mmtc-add-race-form .close-message {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: inherit;
    padding: 0.25rem 0.5rem;
}

.mmtc-add-race-form .close-message:hover {
    opacity: 0.7;
}

.mmtc-add-race-form .form-actions {
    display: flex;
    justify-content: flex-end;
}

.mmtc-add-race-form button[type="submit"] {
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mmtc-add-race-form button[type="submit"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
