/* Day overview grid */
.day-overview-table {
    border-collapse: separate;
    border-spacing: 6px 6px;
    table-layout: fixed;
    width: 100%;
}

.day-overview-table thead th {
    border: none;
    color: #6c757d;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-align: center;
    padding-bottom: 2px;
}

.day-cell {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.12s, box-shadow 0.15s;
    min-height: 185px;
    vertical-align: top;
    border: none !important;
}

/* Pickleball court markings (portrait): net = horizontal 50%, kitchen = 32%/68%, service center = vertical 50% */
.day-cell::before {
    content: '';
    position: absolute;
    inset: 6px;
    pointer-events: none;
    border: 1.5px solid rgba(255, 255, 255, 0.5);
    border-radius: 3px;
    background-image:
        linear-gradient(to bottom,
            transparent calc(50% - 1px),
            rgba(255,255,255,0.55) calc(50% - 1px),
            rgba(255,255,255,0.55) calc(50% + 1px),
            transparent calc(50% + 1px)),
        linear-gradient(to bottom,
            transparent calc(32% - 1px),
            rgba(255,255,255,0.35) calc(32% - 1px),
            rgba(255,255,255,0.35) calc(32% + 1px),
            transparent calc(32% + 1px)),
        linear-gradient(to bottom,
            transparent calc(68% - 1px),
            rgba(255,255,255,0.35) calc(68% - 1px),
            rgba(255,255,255,0.35) calc(68% + 1px),
            transparent calc(68% + 1px)),
        linear-gradient(to right,
            transparent calc(50% - 1px),
            rgba(255,255,255,0.3) calc(50% - 1px),
            rgba(255,255,255,0.3) calc(50% + 1px),
            transparent calc(50% + 1px));
}

.day-cell a {
    position: relative;
    z-index: 1;
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
    padding: 0.75rem;
}

.day-cell:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.13);
}

.day-time-cell {
    vertical-align: middle;
    font-weight: 600;
    white-space: nowrap;
    width: 70px;
}

/* Mobile court carousel */
.court-scroll-container {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.court-scroll-container::-webkit-scrollbar {
    display: none;
}

.court-cell-mobile {
    flex: 0 0 100%;
    scroll-snap-align: start;
    min-height: 80px;
    padding: 0.75rem;
}

.court-indicators {
    text-align: center;
    padding: 4px 0;
    font-size: 0.6rem;
    letter-spacing: 4px;
    color: #6c757d;
}

.court-players {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    margin-top: 0.4rem;
}

.player-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: inherit;
}

.player-avatar.is-core {
    background: rgba(255, 193, 7, 0.3);
    outline: 1.5px solid rgba(255, 193, 7, 0.65);
}

/* Glass-dark theme utilities (public home + logged-in home map view) */
.ph-title { color: #ffffff; }
.ph-subtitle { color: rgba(255,255,255,0.6); }
.ph-day-label { color: rgba(255,255,255,0.45); font-size: 0.78rem; letter-spacing: .05em; text-transform: uppercase; }
.ph-card {
    background: rgba(255,255,255,0.07);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 0.75rem;
}
.ph-card .ph-event-item {
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding: 0.6rem 0.85rem;
}
.ph-card .ph-event-item:last-child { border-bottom: none; }
.ph-time { color: #ffffff; font-weight: 600; }
.ph-venue { color: rgba(255,255,255,0.55); font-size: 0.85rem; }
.ph-name { color: rgba(255,255,255,0.65); font-size: 0.78rem; }
.badge-open    { background: rgba(76,175,80,0.25);  color: #81C784; border: 1px solid rgba(76,175,80,0.4); }
.badge-private { background: rgba(255,193,7,0.2);   color: #ffd54f; border: 1px solid rgba(255,193,7,0.4); }
.badge-club    { background: rgba(66,133,244,0.2);  color: #7ab3f5; border: 1px solid rgba(66,133,244,0.35); }
.badge-venue   { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.6); border: 1px solid rgba(255,255,255,0.2); }
.ph-join-btn {
    background: #2e7d32 !important;
    border: 1px solid #388e3c !important;
    color: #fff !important;
    font-weight: 600;
}
.ph-join-btn:hover { background: #1b5e20 !important; color: #fff !important; }
.ph-empty {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 0.75rem;
    color: rgba(255,255,255,0.5);
}
.ph-cta-primary {
    background: #2e7d32 !important;
    border-color: #388e3c !important;
    color: #fff !important;
    font-weight: 600;
}
.ph-cta-primary:hover { background: #1b5e20 !important; color: #fff !important; }
.ph-cta-secondary {
    background: rgba(255,255,255,0.08) !important;
    border: 1px solid rgba(255,255,255,0.25) !important;
    color: rgba(255,255,255,0.85) !important;
}
.ph-cta-secondary:hover { background: rgba(255,255,255,0.14) !important; color: #fff !important; }
#public-home-map {
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 0.75rem;
    height: 260px;
}
.ph-events-panel {
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.2) transparent;
}
@media (min-width: 992px) {
    .ph-map-wrapper { position: sticky; top: 1rem; }
    #public-home-map { height: calc(100vh - 7rem) !important; }
    .ph-events-panel { max-height: calc(100vh - 7rem); overflow-y: auto; }
}
.ph-mine-card {
    background: rgba(255,255,255,0.07);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 0.75rem;
    padding: 0.65rem 0.85rem;
    color: rgba(255,255,255,0.85);
}
.ph-mine-card > summary {
    list-style: none;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    user-select: none;
}
.ph-mine-card > summary::-webkit-details-marker { display: none; }
.ph-mine-card .card {
    background: rgba(255,255,255,0.08) !important;
    border-color: rgba(255,255,255,0.2) !important;
    color: rgba(255,255,255,0.9) !important;
}
.ph-mine-card .card .text-muted { color: rgba(255,255,255,0.5) !important; }
.ph-mine-card .card .card-title { color: rgba(255,255,255,0.9) !important; }
.ph-mine-card .card .btn-outline-danger { color: #ff6b6b; border-color: #ff6b6b; }
.ph-mine-card .card .btn-outline-secondary { color: rgba(255,255,255,0.6); border-color: rgba(255,255,255,0.25); }
.ph-push-banner {
    background: rgba(66,133,244,0.12);
    border: 1px solid rgba(66,133,244,0.3);
    color: rgba(255,255,255,0.9);
    border-radius: 0.75rem;
    padding: 0.65rem 0.85rem;
    font-size: 0.9rem;
}

/* Public home map markers */
.dink-marker {
    position: relative;
    display: inline-block;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.dink-marker--dim {
    opacity: 0.65;
}

.dink-marker__ball {
    transform-box: fill-box;
    transform-origin: center;
}

/* Idle pulse: amber halo around the whole pin via drop-shadow.
   Far more visible than scaling a 5.5px ball — readable from across the map. */
@keyframes pickleball-glow {
    0%, 100% {
        filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3))
                drop-shadow(0 0 0  rgba(239, 159, 39, 0));
    }
    50% {
        filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3))
                drop-shadow(0 0 10px rgba(239, 159, 39, 0.8));
    }
}

/* Hover/active pulse: short, strong ball scale to confirm interaction. */
@keyframes pickleball-pulse-strong {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.28); }
    100% { transform: scale(1); }
}

.dink-marker--pulse {
    animation: pickleball-glow 2.5s ease-in-out infinite;
}

.pub-marker-active .dink-marker--pulse .dink-marker__ball {
    animation: pickleball-pulse-strong 0.8s ease-out 2;
}

.pub-popup-actions {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 8px;
}

.pub-popup-btn {
    display: block;
    width: 100%;
    padding: 5px 10px;
    font-size: 0.8rem;
    text-align: center;
    border-radius: 5px;
    cursor: pointer;
    border: none;
    text-decoration: none;
}

.pub-popup-btn-primary {
    background: #198754;
    color: #fff;
}

.pub-popup-btn-primary:hover { background: #157347; color: #fff; }

.pub-popup-btn-secondary {
    background: #e9ecef;
    color: #212529;
}

.pub-popup-btn-secondary:hover { background: #d3d8de; color: #212529; }


@keyframes ph-item-glow {
    0%   { background: rgba(255,193,7,0.0); }
    25%  { background: rgba(255,193,7,0.2); }
    100% { background: rgba(255,193,7,0.0); }
}

.ph-event-item.ph-highlight {
    animation: ph-item-glow 1.5s ease-out forwards;
}

.ph-event-item[data-venue-id] { cursor: pointer; }

/* Mobile: larger touch targets */
@media (max-width: 575.98px) {
    .btn-sm {
        padding: 0.375rem 0.75rem;
        font-size: 0.9rem;
    }

    .container {
        padding-left: 12px;
        padding-right: 12px;
    }

    main.container {
        margin-top: 1rem !important;
    }
}

