/* ── LM Competitions — Public Styles ────────────────────────────────────── */

/* ── Leaderboard (shared) ─────────────────────────────────────────────────── */

.lmc-leaderboard {
    width: 100%;
}

/* List layout — use !important on structural properties to override theme resets */
.lmc-lb-list {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.lmc-lb-list > .lmc-lb-item {
    list-style: none !important;
    display: flex !important;
    align-items: center !important;
    gap: 14px;
    padding: 11px 4px !important;
    border-bottom: 1px solid #f0f0f0;
    margin: 0 !important;
    background: transparent;
}

.lmc-lb-list > .lmc-lb-item:last-child {
    border-bottom: none;
}

.lmc-lb-item-top-1 { background: #fffbea !important; }
.lmc-lb-item-top-2 { background: #fafafa !important; }

/* Rank indicator */
.lmc-lb-rank {
    display: flex !important;
    align-items: center !important;
    gap: 8px;
    flex-shrink: 0 !important;
    width: 44px;
}

.lmc-rank-bar {
    display: block !important;
    width: 4px !important;
    min-width: 4px !important;
    height: 28px !important;
    border-radius: 2px;
    background: transparent;
    flex-shrink: 0 !important;
}

.lmc-lb-item-top-1 .lmc-rank-bar { background: #c9a227 !important; }
.lmc-lb-item-top-2 .lmc-rank-bar { background: #b8b8b8 !important; }
.lmc-lb-item-top-3 .lmc-rank-bar { background: #cd7f32 !important; }

.lmc-rank-num {
    font-size: 14px;
    font-weight: 700;
    color: #bbb;
    min-width: 20px;
    text-align: right;
    line-height: 1;
}

.lmc-lb-item-top-1 .lmc-rank-num { color: #c9a227; font-size: 18px; }
.lmc-lb-item-top-2 .lmc-rank-num { color: #9e9e9e; font-size: 16px; }
.lmc-lb-item-top-3 .lmc-rank-num { color: #cd7f32; font-size: 15px; }

/* Row avatars */
.lmc-lb-avatar {
    display: block !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    border-radius: 50% !important;
    object-fit: cover;
    flex-shrink: 0 !important;
}

.lmc-lb-avatar-empty {
    display: block !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    border-radius: 50% !important;
    background-color: #e0e0e0 !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='50' cy='38' r='16' fill='%23bdbdbd'/%3E%3Cellipse cx='50' cy='80' rx='28' ry='20' fill='%23bdbdbd'/%3E%3C/svg%3E") !important;
    background-size: 65% 65% !important;
    background-repeat: no-repeat !important;
    background-position: center 40% !important;
    flex-shrink: 0 !important;
}

.lmc-lb-avatar-empty.lmc-lb-avatar-team {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='27' cy='28' r='14' fill='%23bdbdbd'/%3E%3Cellipse cx='22' cy='70' rx='22' ry='20' fill='%23bdbdbd'/%3E%3Ccircle cx='73' cy='28' r='14' fill='%23bdbdbd'/%3E%3Cellipse cx='78' cy='70' rx='22' ry='20' fill='%23bdbdbd'/%3E%3Ccircle cx='50' cy='37' r='18' fill='%23e0e0e0'/%3E%3Cellipse cx='50' cy='78' rx='26' ry='22' fill='%23e0e0e0'/%3E%3Ccircle cx='50' cy='37' r='15' fill='%23bdbdbd'/%3E%3Cellipse cx='50' cy='78' rx='23' ry='19' fill='%23bdbdbd'/%3E%3C/svg%3E") !important;
    background-size: 75% 75% !important;
}

/* Name */
.lmc-lb-name {
    flex: 1 1 auto;
    font-size: 14px;
    color: #222;
    line-height: 1.4;
}

.lmc-lb-person-label {
    display: block;
    font-weight: 700;
}

.lmc-lb-name a {
    color: inherit;
    text-decoration: underline !important;
    text-underline-offset: 2px;
}

.lmc-lb-name a:hover {
    color: #000;
}

.lmc-lb-team-label {
    display: block;
    font-size: 12px;
    color: #888;
    font-weight: 400;
}

@media ( max-width: 600px ) {
    .lmc-lb-list > .lmc-lb-item-mobile-hidden {
        display: none !important;
    }
}

/* Amount */
.lmc-lb-amount {
    font-size: 14px;
    font-weight: 600;
    color: #222;
    white-space: nowrap;
    flex-shrink: 0;
}

/* End of list */
.lmc-lb-end {
    text-align: center;
    color: #aaa;
    font-size: 13px;
    margin: 16px 0 0;
    padding-top: 12px;
}

.lmc-empty {
    color: #888;
    font-style: italic;
    padding: 16px 0;
}

/* ── Activity Feed ───────────────────────────────────────────────────────── */

.lmc-activity-feed {
    width: 100%;
}

.lmc-feed-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.lmc-feed-item {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid #efefef;
    font-size: 14px;
    transition: background 0.3s ease;
}

/* Pop animation for new items */
.lmc-feed-item-new {
    animation: lmc-item-pop 2.4s ease forwards;
}

.lmc-feed-item-new .lmc-feed-name,
.lmc-feed-item-new .lmc-feed-amount {
    animation: lmc-text-pop 2.4s ease forwards;
}

.lmc-feed-item-new .lmc-feed-subtitle,
.lmc-feed-item-new .lmc-feed-time {
    animation: lmc-muted-pop 2.4s ease forwards;
}

@keyframes lmc-item-pop {
    0%   { opacity: 0; transform: translateY( -10px ) scale( 0.97 ); background-color: #111; }
    14%  { opacity: 1; transform: translateY( 0 )     scale( 1 );    background-color: #111; }
    100% { opacity: 1; transform: translateY( 0 )     scale( 1 );    background-color: transparent; }
}

@keyframes lmc-text-pop {
    0%, 14% { color: #fff; }
    100%    { color: #111; }
}

@keyframes lmc-muted-pop {
    0%, 14% { color: rgba( 255, 255, 255, 0.65 ); }
    100%    { color: #777; }
}

/* Left column: name above subtitle */
.lmc-feed-left {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.lmc-feed-name {
    display: block;
    font-weight: 600;
    color: #111;
}

.lmc-feed-subtitle {
    display: block;
    font-size: 13px;
    color: #777;
    margin-top: 2px;
}

/* Right column: amount above time, right-aligned */
.lmc-feed-right {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.lmc-feed-amount {
    display: block;
    font-weight: 700;
    white-space: nowrap;
    color: #111;
}

.lmc-feed-time {
    display: block;
    font-size: 12px;
    color: #999;
    white-space: nowrap;
    margin-top: 2px;
}

.lmc-feed-empty {
    color: #888;
    font-style: italic;
    padding: 16px 0;
    list-style: none;
}

/* ── Person Stats ────────────────────────────────────────────────────────── */

.lmc-person-stats {
    width: 100%;
}

.lmc-stats-list {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 0;
    padding: 0;
}

.lmc-stat {
    background: #f8f8f8;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    padding: 14px 20px;
    min-width: 140px;
}

.lmc-stat dt {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #888;
    margin-bottom: 6px;
}

.lmc-stat dd {
    font-size: 22px;
    font-weight: 700;
    color: #111;
    margin: 0;
}

.lmc-stat-layer dt {
    font-size: 11px;
}

.lmc-stat-layer dd {
    font-size: 15px;
}

/* ── Unified Leaderboard ─────────────────────────────────────────────────── */

/* Tab navigation */
.lmc-lb-nav {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    border-bottom: 2px solid #e5e5e5;
    margin-bottom: 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.lmc-lb-nav::-webkit-scrollbar {
    display: none;
}

.lmc-lb-tabs-left,
.lmc-lb-tabs-right {
    display: flex;
    align-items: flex-end;
    flex-shrink: 0;
}

.lmc-lb-tab {
    background: none !important;
    border: none !important;
    border-bottom: 2px solid transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 14px !important;
    color: #888 !important;
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    transition: color 0.15s, border-color 0.15s;
}

.lmc-lb-tab:hover {
    color: #333 !important;
    background: none !important;
}

.lmc-lb-tab-active {
    color: #111 !important;
    border-bottom-color: #111 !important;
}

.lmc-lb-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid #c5c5c5;
    background: transparent;
    color: #999;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
}

.lmc-lb-tab-active .lmc-lb-count {
    background: #3b7dd8;
    border-color: #3b7dd8;
    color: #fff;
}

/* Panel visibility */
.lmc-lb-panel-hidden {
    display: none !important;
}

/* All Participants controls */
.lmc-all-controls {
    display: flex !important;
    gap: 10px;
    margin-bottom: 20px;
    align-items: center;
}

.lmc-all-controls .lmc-all-search {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: auto !important;
    box-sizing: border-box !important;
    padding: 9px 13px !important;
    border: 1px solid #ddd !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    outline: none !important;
    background: #fff !important;
    box-shadow: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    height: auto !important;
}

.lmc-all-controls .lmc-all-search:focus {
    border-color: #aaa !important;
}

.lmc-all-controls .lmc-all-sort {
    padding: 9px 13px !important;
    border: 1px solid #ddd !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    background: #fff !important;
    cursor: pointer;
    outline: none !important;
    box-shadow: none !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    width: auto !important;
    max-width: 160px !important;
    height: auto !important;
    -webkit-appearance: auto !important;
    appearance: auto !important;
}

/* Card grid */
.lmc-all-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px 16px;
}

@media ( max-width: 900px ) {
    .lmc-all-grid { grid-template-columns: repeat(3, 1fr); }
}

@media ( max-width: 580px ) {
    .lmc-all-grid { grid-template-columns: repeat(2, 1fr); }
}

.lmc-all-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    padding: 16px 12px;
    border: 1px solid #ebebeb;
    border-radius: 10px;
    background: #fff;
}

.lmc-card-hidden {
    display: none !important;
}

/* Avatars */
.lmc-all-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    flex-shrink: 0;
}

.lmc-all-avatar-empty {
    display: block;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background-color: #e0e0e0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='50' cy='38' r='16' fill='%23bdbdbd'/%3E%3Cellipse cx='50' cy='80' rx='28' ry='20' fill='%23bdbdbd'/%3E%3C/svg%3E");
    background-size: 65% 65%;
    background-repeat: no-repeat;
    background-position: center 40%;
    flex-shrink: 0;
}

.lmc-all-name {
    font-weight: 600;
    font-size: 14px;
    color: #222;
    text-decoration: none;
    line-height: 1.3;
}

a.lmc-all-name:hover {
    text-decoration: underline;
}

.lmc-all-amount {
    font-size: 13px;
    color: #777;
}

.lmc-all-getlink {
    background: none !important;
    border: 1px solid #ccc !important;
    border-radius: 6px !important;
    box-shadow: none !important;
    cursor: pointer;
    font-size: 12px !important;
    color: #555 !important;
    font-weight: 500;
    text-decoration: none !important;
    padding: 5px 14px !important;
    margin-top: 4px;
    transition: border-color 0.15s, color 0.15s;
}

.lmc-all-getlink:hover {
    color: #111 !important;
    border-color: #888 !important;
    background: none !important;
}

/* Show more */
.lmc-all-more-wrap {
    text-align: center;
    margin-top: 24px;
}

.lmc-all-more {
    background: none !important;
    border: 1px solid #ddd !important;
    border-radius: 6px !important;
    box-shadow: none !important;
    padding: 9px 28px !important;
    font-size: 14px !important;
    cursor: pointer;
    color: #555 !important;
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    transition: background 0.15s;
}

.lmc-all-more:hover {
    background: #f5f5f5 !important;
}

.lmc-all-more-icon {
    font-size: 16px;
    line-height: 1;
}

/* Modal */
.lmc-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 20px;
}

.lmc-modal-hidden {
    display: none !important;
}

.lmc-modal {
    background: #fff;
    border-radius: 12px;
    padding: 32px;
    width: 100%;
    max-width: 480px;
    position: relative;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18);
}

.lmc-modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    color: #aaa !important;
    padding: 4px 6px !important;
}

.lmc-modal-close:hover {
    color: #333 !important;
    background: none !important;
}

.lmc-modal-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 18px;
    padding-right: 28px;
    color: #111;
    line-height: 1.3;
}

.lmc-modal-url {
    display: block;
    width: 100%;
    padding: 11px 13px;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    font-size: 13px;
    color: #555;
    margin-bottom: 14px;
    box-sizing: border-box;
    outline: none;
    background: #fafafa;
}

.lmc-modal-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.lmc-modal-copy {
    padding: 12px 16px !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer;
    border: 2px solid #111 !important;
    background: #111 !important;
    color: #fff !important;
    box-shadow: none !important;
    transition: background 0.15s, border-color 0.15s;
    text-align: center;
}

.lmc-modal-copy:hover {
    background: #333 !important;
    border-color: #333 !important;
    color: #fff !important;
}

.lmc-modal-share {
    padding: 12px 16px !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer;
    border: 2px solid #111 !important;
    background: transparent !important;
    color: #111 !important;
    box-shadow: none !important;
    transition: background 0.15s, color 0.15s;
    text-align: center;
}

.lmc-modal-share:hover {
    background: #111 !important;
    color: #fff !important;
}

/* ── Referral Picker Modal ───────────────────────────────────────────────── */

.lmc-picker-modal {
    max-width: 440px;
}

/* Search combobox */
.lmc-picker-search-wrap {
    position: relative;
    margin-bottom: 14px;
}

.lmc-picker-search {
    display: block;
    width: 100%;
    padding: 11px 13px;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    font-size: 14px;
    box-sizing: border-box;
    outline: none;
    background: #fafafa;
    color: #333;
}

.lmc-picker-search:focus {
    border-color: #aaa;
    background: #fff;
}

/* Dropdown list */
.lmc-picker-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-top: 4px;
    list-style: none !important;
    padding: 4px 0 !important;
    margin-left: 0 !important;
    max-height: 220px;
    overflow-y: auto;
    z-index: 10;
    box-shadow: 0 4px 16px rgba( 0, 0, 0, 0.1 );
}

.lmc-picker-dropdown-hidden {
    display: none !important;
}

.lmc-picker-option {
    padding: 10px 14px !important;
    font-size: 14px;
    cursor: pointer;
    color: #222;
    list-style: none !important;
    margin: 0 !important;
}

.lmc-picker-option:hover,
.lmc-picker-option.lmc-picker-option-focused {
    background: #f5f5f5;
}

/* Link reveal area */
.lmc-picker-link-hidden {
    display: none !important;
}

/* Admin-only notice (shortcode context missing) */
.lmc-admin-notice {
    padding: 8px 12px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    font-size: 13px;
    margin: 8px 0;
}
