/**
 * Chess Podium Public Shortcode Styles
 */

.cp-club-ranking,
.cp-player-profile,
.cp-grand-prix {
    margin: 1.5rem 0;
    font-family: inherit;
}

.cp-grand-prix-title {
    margin: 0 0 0.5rem;
    font-size: 1.5rem;
}

.cp-grand-prix-desc {
    margin: 0 0 1rem;
    color: #666;
}

.cp-grand-prix-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 1rem;
}

.cp-grand-prix-table th,
.cp-grand-prix-table td {
    padding: 0.6rem 1rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.cp-grand-prix-table th {
    background: #f5f5f5;
    font-weight: 600;
}

.cp-grand-prix-table tbody tr:hover {
    background: #f9f9f9;
}

.cp-grand-prix-section {
    margin: 2rem 0 1rem;
    font-size: 1.25rem;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0.5rem;
}

.cp-grand-prix-tournament-name {
    margin: 1.5rem 0 0.75rem;
    font-size: 1.1rem;
}

.cp-grand-prix-tournament-table {
    margin-bottom: 1.5rem;
}

.cp-club-ranking h2,
.cp-player-profile h2 {
    margin: 0 0 1rem;
    font-size: 1.5rem;
}

.cp-player-profile h3 {
    margin: 1.5rem 0 0.75rem;
    font-size: 1.2rem;
}

/* Player profile shortcode: photo + linked name (same idea as Grand Prix → full profile) */
.cp-player-profile .cp-player-profile-title {
    margin: 0 0 1rem;
    font-size: 1.5rem;
    line-height: 1.25;
}

.cp-player-profile .cp-player-profile-cardlink {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    text-decoration: none;
    color: #0f172a;
    font-weight: 700;
    border-radius: 10px;
    padding: 4px 10px 4px 4px;
    margin: -4px -10px 0 -4px;
    max-width: 100%;
    box-sizing: border-box;
}

.cp-player-profile .cp-player-profile-cardlink:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.cp-player-profile .cp-player-profile-cardlink:hover .cp-player-profile-name-text {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.cp-player-profile .cp-player-profile-avatar {
    width: 72px;
    height: 72px;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.cp-player-profile .cp-player-profile-name-inner {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    min-width: 0;
}

.cp-player-profile .cp-flag-img {
    flex-shrink: 0;
    vertical-align: middle;
}

.cp-player-profile .cp-player-profile-head-plain {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    font-weight: 700;
    color: #0f172a;
    max-width: 100%;
    flex-wrap: wrap;
}

.cp-club-table,
.cp-profile-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 1rem;
}

.cp-club-table th,
.cp-club-table td,
.cp-profile-table th,
.cp-profile-table td {
    padding: 0.6rem 1rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.cp-club-table th,
.cp-profile-table th {
    background: #f5f5f5;
    font-weight: 600;
}

.cp-club-table tbody tr:hover,
.cp-profile-table tbody tr:hover {
    background: #f9f9f9;
}

/* Live badge for DGT board transmission */
.cp-live-badge {
    display: inline-block;
    margin-left: 0.35em;
    padding: 0.15em 0.5em;
    font-size: 0.75em;
    font-weight: 600;
    color: #fff;
    background: #22c55e;
    border-radius: 4px;
    vertical-align: middle;
}

/* Watch Live Boards button - scrolls to live boards section */
.cp-watch-live-btn {
    display: inline-block;
    padding: 0.35em 0.75em;
    font-weight: 600;
    color: #fff;
    background: #22c55e;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.2s;
}
.cp-watch-live-btn:hover {
    background: #16a34a;
    color: #fff;
}

/* Live board clickable - full screen view */
.cp-live-board-clickable:hover {
    border-color: #22c55e;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.3);
}

/* PGN navigation under each live board */
.cp-live-board-pgn-nav {
    font-size: 0.85em;
    color: #374151;
}
.cp-live-pgn-controls {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}
.cp-live-pgn-controls button {
    padding: 0.25rem 0.5rem;
    font-size: 0.9rem;
    cursor: pointer;
    background: #e5e7eb;
    border: 1px solid #d1d5db;
    border-radius: 4px;
}
.cp-live-pgn-controls button:hover:not(:disabled) {
    background: #d1d5db;
}
.cp-live-pgn-controls button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.cp-live-pgn-info {
    min-width: 4rem;
    font-size: 0.9em;
    color: #6b7280;
}
.cp-live-pgn-moves {
    max-height: 4.5em;
    overflow-y: auto;
    line-height: 1.5;
    word-wrap: break-word;
}
.cp-live-pgn-move {
    cursor: pointer;
    padding: 0.1em 0.2em;
    border-radius: 2px;
}
.cp-live-pgn-move:hover {
    background: #e5e7eb;
}
.cp-live-pgn-move-current {
    background: #22c55e;
    color: #fff;
    font-weight: 600;
}
.cp-live-pgn-move-current:hover {
    background: #16a34a;
}
