/* Course Check-In Styles */

/* ========== Check-In Modal ========== */
.checkin-modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.checkin-modal-overlay.active {
    display: flex;
}

.checkin-modal {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 480px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.checkin-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e0e0e0;
}

.checkin-modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
    color: #2c3e50;
}

.checkin-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 0;
    line-height: 1;
}

.checkin-modal-body {
    padding: 1.25rem 1.5rem;
    overflow-y: auto;
    flex: 1;
}

/* Already checked in banner */
.checkin-current {
    background: #e8f5e9;
    border: 1px solid #c8e6c9;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.25rem;
}

.checkin-current-label {
    font-size: 0.8rem;
    color: #388e3c;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.checkin-current-course {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2e7d32;
    margin-bottom: 0.5rem;
}

.checkin-current-time {
    font-size: 0.8rem;
    color: #66bb6a;
    margin-bottom: 0.75rem;
}

.checkin-checkout-btn {
    background: #ef5350;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s;
}

.checkin-checkout-btn:hover {
    background: #e53935;
}

/* Search box */
.checkin-search {
    margin-bottom: 1.25rem;
}

.checkin-search input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.95rem;
    box-sizing: border-box;
}

.checkin-search input:focus {
    outline: none;
    border-color: #2B5A9E;
    box-shadow: 0 0 0 3px rgba(43,90,158,0.1);
}

/* Recent courses section */
.checkin-section-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
}

.checkin-course-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 1.25rem;
}

.checkin-course-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
    border: 1px solid #eee;
}

.checkin-course-item:hover {
    background: #f0f4ff;
    border-color: #2B5A9E;
}

.checkin-course-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95rem;
}

.checkin-course-country {
    font-size: 0.8rem;
    color: #888;
}

/* No results */
.checkin-no-results {
    text-align: center;
    color: #999;
    padding: 1.5rem;
    font-size: 0.9rem;
}

/* ========== Homepage "Check In" CTA ========== */
.casual-promo-cta--checkin {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1.5px solid rgba(255,255,255,0.5);
}

.casual-promo-cta--checkin:hover {
    background: rgba(255,255,255,0.3);
}

/* ========== At Courses Tab (Tee Times Page) ========== */
.at-courses-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0 20px;
}

.at-courses-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 1.25rem;
    transition: box-shadow 0.2s;
}

.at-courses-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.at-courses-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.at-courses-card-header a {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2B5A9E;
    text-decoration: none;
}

.at-courses-card-header a:hover {
    text-decoration: underline;
}

.at-courses-count-badge {
    background: #e8f5e9;
    color: #2e7d32;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
}

.at-courses-players {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.at-courses-player {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0;
    border-bottom: 1px solid #f5f5f5;
}

.at-courses-player:last-child {
    border-bottom: none;
}

.at-courses-player-name {
    font-weight: 500;
    color: #333;
}

.at-courses-player-time {
    font-size: 0.8rem;
    color: #999;
}

.at-courses-player-checkout {
    background: #ef5350;
    color: white;
    border: none;
    padding: 0.3rem 0.75rem;
    border-radius: 5px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
}

.at-courses-player-checkout:hover {
    background: #e53935;
}

.at-courses-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: #999;
}

.at-courses-empty-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

/* ========== Course Detail Badge ========== */
.course-checkin-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #e8f5e9;
    color: #2e7d32;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.3rem 0.75rem;
    border-radius: 16px;
    margin-left: 0.5rem;
}

.course-checkin-badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4caf50;
    animation: checkin-pulse 2s infinite;
}

@keyframes checkin-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* ========== Check-In Map Panel ========== */
.checkin-map-panel {
    margin: 0 20px 1.5rem;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    background: white;
}

.checkin-map-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    cursor: pointer;
    user-select: none;
    border-bottom: 1px solid #e0e0e0;
}

.checkin-map-header:hover {
    background: #f0f1f3;
}

.checkin-map-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    color: #2c3e50;
}

.checkin-map-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4caf50;
    animation: checkin-pulse 2s infinite;
}

.checkin-map-count {
    color: #888;
    font-weight: 400;
    font-size: 0.85rem;
}

.checkin-map-toggle {
    color: #888;
    font-size: 0.8rem;
}

.checkin-map-body {
    padding: 0.75rem;
}

/* Custom map marker */
.checkin-map-marker {
    background: none;
    border: none;
}

.checkin-marker-pin {
    width: 32px;
    height: 32px;
    background: #2B5A9E;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    border: 2px solid white;
}

.checkin-marker-pin span {
    transform: rotate(45deg);
    color: white;
    font-weight: 700;
    font-size: 0.8rem;
}

/* Map popup */
.checkin-map-popup strong a {
    color: #2B5A9E;
    text-decoration: none;
    font-size: 0.95rem;
}

.checkin-map-popup strong a:hover {
    text-decoration: underline;
}

.checkin-popup-players {
    margin-top: 0.5rem;
}

.checkin-popup-player {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.25rem 0;
    font-size: 0.85rem;
    border-bottom: 1px solid #f0f0f0;
}

.checkin-popup-player:last-child {
    border-bottom: none;
}

.checkin-popup-time {
    color: #999;
    font-size: 0.75rem;
    margin-left: 0.75rem;
}

/* Tournament warning pin (red) */
.checkin-marker-pin--tournament {
    background: #C0392B;
}

/* Tournament info in popup */
.checkin-popup-tournament {
    margin-top: 0.35rem;
    padding: 0.3rem 0.5rem;
    background: #fdecea;
    border-radius: 4px;
    font-size: 0.8rem;
    color: #c0392b;
    font-weight: 600;
}

/* Courses without coordinates (text fallback) */
.checkin-map-nocoords {
    padding: 0.5rem 0.25rem 0;
    font-size: 0.85rem;
    color: #555;
}

.checkin-nocoord-item {
    padding: 0.4rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.checkin-nocoord-item:last-child {
    border-bottom: none;
}

/* ========== Mobile ========== */
@media (max-width: 768px) {
    .checkin-modal {
        width: 95%;
        max-height: 85vh;
    }

    .casual-promo-actions {
        flex-direction: column;
        align-items: center;
        width: 75%;
        margin: 0 auto;
    }

    .casual-promo-actions .casual-promo-cta {
        width: 100%;
        text-align: center;
        box-sizing: border-box;
    }

    .checkin-map-panel {
        margin: 0 10px 1rem;
    }

    #checkin-map {
        height: 250px !important;
    }
}
