/* ═══════════════════════════════════════════════════════════════
   Golf Meeting Management — Front-end Styles
   England Golf-style player profile
   ═══════════════════════════════════════════════════════════════ */

/* ─── Profile Container ──────────────────────────────────────── */

.gmm-profile {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #1a1a1a;
    line-height: 1.5;
    max-width: 600px;
    margin: 0 auto;
}

/* ─── Header Card ────────────────────────────────────────────── */

.gmm-profile-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px 24px;
    margin-bottom: 20px;
}

.gmm-profile-name {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 6px;
    color: #1a1a1a;
}

.gmm-profile-hi {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.gmm-profile-hi-label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.gmm-profile-hi-value {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
}

/* ─── Chart ──────────────────────────────────────────────────── */

.gmm-profile-chart-wrap {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px 12px;
    margin-bottom: 8px;
    height: 220px;
}

.gmm-chart-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 8px 0 16px;
    font-size: 12px;
    color: #666;
}

.gmm-legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.gmm-legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.gmm-legend-counting {
    background: #16a34a;
}

.gmm-legend-noncounting {
    background: #f97316;
}

.gmm-legend-line {
    display: inline-block;
    width: 18px;
    height: 2px;
    background: #2563eb;
    border-radius: 1px;
}

/* ─── Scores List ────────────────────────────────────────────── */

.gmm-scores-header {
    font-size: 16px;
    font-weight: 700;
    padding: 12px 0 8px;
    color: #1a1a1a;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 0;
}

.gmm-scores-list {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 8px 8px;
}

/* Individual score row */
.gmm-score-row {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    gap: 12px;
}

.gmm-score-info {
    flex: 1;
    min-width: 0;
}

.gmm-score-date {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
}

.gmm-score-course {
    font-size: 13px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gmm-score-stats {
    text-align: right;
    flex-shrink: 0;
}

.gmm-score-hi {
    font-size: 13px;
    color: #444;
    font-weight: 500;
}

.gmm-score-diff {
    font-size: 12px;
    color: #888;
}

/* Score circle — non-counting (grey border, white bg) */
.gmm-score-circle {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    flex-shrink: 0;
    background: #fff;
    border: 2.5px solid #bbb;
    color: #1a1a1a;
}

/* Score circle — counting (green bg, white text) */
.gmm-score-circle.gmm-score-counting {
    background: #16a34a;
    border-color: #16a34a;
    color: #fff;
}

/* Divider between scores — thin grey hr */
hr.gmm-score-divider {
    margin: 0 16px;
    border: none;
    border-top: 1px solid #e8e8e8;
}

/* Rolling window separator — green 3px hr */
.gmm-scores-separator {
    margin: 0 16px;
    border: none;
    border-top: 3px solid #16a34a;
}

/* No scores message */
.gmm-no-scores {
    text-align: center;
    color: #888;
    padding: 40px 20px;
    font-size: 14px;
}

/* ─── Results ─────────────────────────────────────────────── */

.gmm-results-wrap {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    max-width: 600px;
    margin: 0 auto;
    color: #1a1a1a;
}

/* Header card */
.gmm-results-header-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px 24px;
    margin-bottom: 20px;
}

.gmm-results-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 6px;
    color: #1a1a1a;
}

.gmm-results-meta {
    font-size: 14px;
    color: #666;
    margin: 0;
    line-height: 1.6;
}

/* Division block */
.gmm-results-division {
    margin-bottom: 24px;
}

.gmm-division-header {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 0 0 6px;
    border-bottom: 2px solid #1a1a1a;
    margin-bottom: 0;
}

.gmm-division-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
    color: #1a1a1a;
}

.gmm-division-subtitle {
    font-size: 13px;
    color: #888;
    font-weight: 400;
}

/* Results table */
.gmm-results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 8px 8px;
}

.gmm-results-table thead th {
    background: #f7f7f7;
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #e0e0e0;
}

.gmm-results-table tbody td {
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.gmm-results-table tbody tr:last-child td {
    border-bottom: none;
}

.gmm-col-pos { width: 50px; text-align: center; }
.gmm-col-hcp { width: 100px; text-align: center; }
.gmm-col-score { width: 70px; text-align: center; }

/* Position badges for podium */
.gmm-pos-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
}

.gmm-pos-1 { background: #d4a017; }
.gmm-pos-2 { background: #9ca3af; }
.gmm-pos-3 { background: #b45309; }

/* ─── Handicap List Table ────────────────────────────────────── */

.gmm-handicap-list-wrap {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    max-width: 600px;
    margin: 0 auto;
}

.gmm-handicap-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.gmm-handicap-table th {
    background: #f5f5f5;
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #ddd;
    font-size: 13px;
    color: #444;
}

.gmm-handicap-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
}

/* ─── Responsive ─────────────────────────────────────────────── */

@media (max-width: 480px) {
    .gmm-score-row {
        padding: 12px;
        gap: 8px;
    }

    .gmm-score-circle {
        width: 46px;
        height: 46px;
        font-size: 14px;
    }

    .gmm-profile-card {
        padding: 16px;
    }

    .gmm-profile-name {
        font-size: 18px;
    }

    .gmm-profile-hi-value {
        font-size: 24px;
    }
}

/* ═══════════════════════════════════════════════════════════════
   Front-end Event Management
   ═══════════════════════════════════════════════════════════════ */

.gmm-fe-dashboard,
.gmm-fe-manage,
.gmm-fe-scorecard {
    max-width: 900px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #1a1a1a;
}

.gmm-fe-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 20px;
}

.gmm-fe-back {
    color: #2271b1;
    text-decoration: none;
    font-size: 14px;
}
.gmm-fe-back:hover { text-decoration: underline; }

/* Event header */
.gmm-fe-event-header {
    margin-bottom: 20px;
}
.gmm-fe-event-header h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 4px;
}
.gmm-fe-meta {
    font-size: 14px;
    color: #666;
    margin: 0;
}

/* Event cards on dashboard */
.gmm-fe-event-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gmm-fe-event-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px 20px;
    gap: 16px;
    flex-wrap: wrap;
}

.gmm-fe-event-info { flex: 1; min-width: 0; }

.gmm-fe-event-date {
    font-size: 13px;
    color: #888;
    font-weight: 500;
}

.gmm-fe-event-name {
    font-size: 17px;
    font-weight: 700;
    margin: 2px 0;
}

.gmm-fe-event-venue {
    font-size: 13px;
    color: #666;
}

.gmm-fe-event-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* Status badges */
.gmm-fe-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.gmm-fe-status-setup { background: #f0f0f1; color: #666; }
.gmm-fe-status-in_progress { background: #fff3cd; color: #856404; }
.gmm-fe-status-finalised { background: #dafbe1; color: #1a7f37; }

/* Buttons */
.gmm-fe-btn {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: background 0.15s;
}
.gmm-fe-btn-primary {
    background: #2271b1;
    color: #fff;
}
.gmm-fe-btn-primary:hover { background: #135e96; color: #fff; }
.gmm-fe-btn-secondary {
    background: #f0f0f1;
    color: #1a1a1a;
}
.gmm-fe-btn-secondary:hover { background: #ddd; color: #1a1a1a; }
.gmm-fe-btn-large {
    padding: 12px 28px;
    font-size: 16px;
}

/* Notices */
.gmm-fe-notice {
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 16px;
}
.gmm-fe-notice-success { background: #dafbe1; color: #1a7f37; border: 1px solid #a7f3d0; }
.gmm-fe-notice-error { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.gmm-fe-notice-info { background: #dbeafe; color: #1e40af; border: 1px solid #93c5fd; }

/* Player list */
.gmm-fe-player-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: #e0e0e0;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.gmm-fe-player-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    padding: 12px 16px;
    gap: 12px;
    flex-wrap: wrap;
}

.gmm-fe-player-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.gmm-fe-player-name {
    font-weight: 600;
    font-size: 15px;
}

.gmm-fe-player-type {
    font-size: 12px;
    color: #888;
    background: #f5f5f5;
    padding: 2px 8px;
    border-radius: 10px;
}

.gmm-fe-player-hcp {
    font-size: 13px;
    color: #555;
}

.gmm-fe-player-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.gmm-fe-card-status {
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 10px;
}
.gmm-fe-card-done { background: #dafbe1; color: #1a7f37; }
.gmm-fe-card-pending { background: #f0f0f1; color: #888; }

/* Front-end results */
.gmm-fe-results-div-title {
    font-size: 16px;
    font-weight: 700;
    margin: 20px 0 8px;
    padding-bottom: 6px;
    border-bottom: 2px solid #1a1a1a;
}
.gmm-fe-results-div-sub {
    font-size: 13px;
    color: #888;
    font-weight: 400;
}

/* Front-end scorecard reuses .gmm-hcard styles from admin.css */
/* We duplicate the essential ones here for front-end rendering */

.gmm-fe-scorecard .gmm-scorecard-block { margin-bottom: 16px; overflow-x: auto; }
.gmm-fe-scorecard .gmm-hcard { border-collapse: collapse; width: 100%; font-size: 13px; table-layout: fixed; }
.gmm-fe-scorecard .gmm-hcard td { text-align: center; padding: 6px 2px; border: 1px solid #e8e8e8; vertical-align: middle; }
.gmm-fe-scorecard .gmm-hcard-label { width: 50px; font-weight: 600; text-align: left !important; padding-left: 8px !important; background: #f9f9f9; color: #444; font-size: 11px; text-transform: uppercase; letter-spacing: 0.3px; }
.gmm-fe-scorecard .gmm-hcard-total { width: 45px; font-weight: 700; background: #f5f5f5; }
.gmm-fe-scorecard .gmm-hcard-row-hole td { background: #2c3e50; color: #fff; font-weight: 700; font-size: 12px; }
.gmm-fe-scorecard .gmm-hcard-row-hole .gmm-hcard-label,
.gmm-fe-scorecard .gmm-hcard-row-hole .gmm-hcard-total { background: #2c3e50; color: #fff; }
.gmm-fe-scorecard .gmm-hcard-row-par td { font-weight: 600; color: #333; background: #f0f0f0; }
.gmm-fe-scorecard .gmm-hcard-row-par .gmm-hcard-label,
.gmm-fe-scorecard .gmm-hcard-row-par .gmm-hcard-total { background: #eaeaea; }
.gmm-fe-scorecard .gmm-hcard-row-si td { font-size: 11px; color: #888; }
.gmm-fe-scorecard .gmm-hcard-row-pts td { font-weight: 600; color: #2271b1; background: #f7fbff; }
.gmm-fe-scorecard .gmm-hcard-row-pts .gmm-hcard-label,
.gmm-fe-scorecard .gmm-hcard-row-pts .gmm-hcard-total { background: #eef5fc; font-weight: 700; }
.gmm-fe-scorecard .gmm-hcard-score-cell { padding: 4px 1px !important; }
.gmm-fe-scorecard .gmm-score-wrap { display: flex; align-items: center; justify-content: center; gap: 2px; }
.gmm-fe-scorecard .gmm-score-btn { width: 22px; height: 22px; border: none; background: #e0e0e0; color: #555; font-size: 15px; font-weight: 700; line-height: 1; cursor: pointer; border-radius: 3px; padding: 0; display: flex; align-items: center; justify-content: center; }
.gmm-fe-scorecard .gmm-score-btn:hover { background: #ccc; }
.gmm-fe-scorecard .gmm-score-value { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; font-weight: 700; font-size: 14px; border: 2px solid #f2f2f2; border-radius: 2px; color: #1a1a1a; background: #fff; transition: all 0.15s; }
.gmm-fe-scorecard .gmm-score-value.gmm-score-par { border-color: #f2f2f2; }
.gmm-fe-scorecard .gmm-score-value.gmm-score-birdie { border: 2px solid #1a7f37; border-radius: 50%; color: #1a7f37; }
.gmm-fe-scorecard .gmm-score-value.gmm-score-eagle { border: 2px solid #1a7f37; border-radius: 50%; color: #1a7f37; box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 4px #1a7f37; }
.gmm-fe-scorecard .gmm-score-value.gmm-score-bogey { border: 2px solid #b32d2e; border-radius: 2px; color: #b32d2e; }
.gmm-fe-scorecard .gmm-score-value.gmm-score-double-bogey { border: 2px solid #b32d2e; border-radius: 2px; color: #b32d2e; box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 4px #b32d2e; }
.gmm-fe-scorecard .gmm-score-value.gmm-nr { border-color: #ccc; color: #999; font-size: 11px; }
.gmm-fe-scorecard .gmm-scorecard-totals { background: #f5f5f5; border: 1px solid #e0e0e0; border-radius: 4px; padding: 10px 16px; font-size: 15px; margin-top: 4px; }

@media (max-width: 600px) {
    .gmm-fe-event-card { flex-direction: column; align-items: flex-start; }
    .gmm-fe-event-actions { width: 100%; justify-content: space-between; }
    .gmm-fe-player-row { flex-direction: column; align-items: flex-start; }
    .gmm-fe-player-actions { width: 100%; justify-content: flex-end; }
}
