/**
 * Webisport Dashboard - Convocations Section Styles
 * 
 * Convocation-specific styles only.
 * Shared components (info-grid, detail-layout, etc.) are in components.css
 *
 * All values use Vuexy design tokens directly — no override section needed.
 */

/* ================================================
   Player Count Highlight
   ================================================ */

.webisport-dashboard .webisport-count-highlight {
    color: var(--ws-primary-ink);
    font-weight: 700;
    font-size: 1.1em;
}

/* ================================================
   Match Teams Display (List Table)
   ================================================ */

.webisport-dashboard .convocation-match-cell {
    min-width: 200px;
}

.webisport-dashboard .convocation-match-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.webisport-dashboard .convocation-match-link:hover,
.webisport-dashboard .convocation-match-link:focus {
    color: var(--ws-primary-ink);
    text-decoration: none;
}

.webisport-dashboard .convocation-match-link:hover strong,
.webisport-dashboard .convocation-match-link:focus strong,
.webisport-dashboard .convocation-match-link:hover .convocation-match-team span,
.webisport-dashboard .convocation-match-link:focus .convocation-match-team span {
    text-decoration: underline;
}

.webisport-dashboard .convocation-match-teams {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 4px;
}

.webisport-dashboard .convocation-match-team {
    display: flex;
    align-items: center;
    gap: 8px;
}

.webisport-dashboard .convocation-match-team span {
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.webisport-dashboard .convocation-team-logo {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    object-fit: contain;
}

.webisport-dashboard .convocation-match-vs {
    font-size: 11px;
    font-weight: 500;
    color: var(--ws-text-muted);
    padding-left: 30px;
}

/* ================================================
   Detail Page Layout
   ================================================ */

.webisport-dashboard .convocation-detail-page {
    display: flex;
    flex-direction: column;
    gap: var(--ws-space-4);
}

.webisport-dashboard .convocation-detail-header .webisport-card-body {
    padding: var(--ws-space-5) var(--ws-space-4);
}

.webisport-dashboard .convocation-detail-header-row {
    display: flex;
    align-items: center;
    gap: var(--ws-space-4);
}

.webisport-dashboard .convocation-detail-header-logo {
    flex: 0 0 auto;
    width: 15%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.webisport-dashboard .convocation-detail-header-logo[hidden] {
    display: none;
}

.webisport-dashboard .convocation-detail-header-logo img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.webisport-dashboard .convocation-detail-score {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--ws-space-2);
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.webisport-dashboard .convocation-detail-score[hidden] {
    display: none;
}

.webisport-dashboard .convocation-detail-score-separator {
    color: var(--ws-text-muted);
    font-weight: 400;
}

.webisport-dashboard .convocation-detail-score-loser {
    color: var(--ws-text-muted);
}

/* Player response shown at the top of the status modal */
.webisport-dashboard .convocation-response-detail {
    display: flex;
    flex-direction: column;
    gap: var(--ws-space-2);
    margin-bottom: var(--ws-space-4);
}

.webisport-dashboard .convocation-response-detail-player {
    font-weight: 600;
}

.webisport-dashboard .convocation-response-detail-list {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: var(--ws-space-1) var(--ws-space-3);
    margin: 0;
}

.webisport-dashboard .convocation-response-detail-list dt {
    color: var(--ws-text-muted);
}

.webisport-dashboard .convocation-response-detail-list dd {
    margin: 0;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.webisport-dashboard .convocation-response-detail-edit-title {
    margin-top: var(--ws-space-2);
    padding-top: var(--ws-space-3);
    border-top: 1px solid var(--ws-border);
    font-weight: 600;
}

.webisport-dashboard .convocation-detail-header-center {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--ws-space-3);
}

.webisport-dashboard .convocation-detail-header-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: var(--ws-space-2) var(--ws-space-3);
}

.webisport-dashboard .convocation-detail-header-date {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--ws-text-muted);
}

.webisport-dashboard .convocation-detail-header-date .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.webisport-dashboard .convocation-detail-header-title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--ws-gray-800);
    line-height: 1.3;
}

.webisport-dashboard .convocation-detail-header-sub {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: var(--ws-space-2) var(--ws-space-3);
    font-size: 13px;
}

.webisport-dashboard .convocation-detail-header-group {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--ws-text-muted);
}

.webisport-dashboard .convocation-detail-header-group .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.webisport-dashboard .convocation-detail-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--ws-space-3);
    margin-top: var(--ws-space-1);
}

.webisport-dashboard .convocation-detail-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 64px;
    padding: var(--ws-space-2) var(--ws-space-3);
    border-radius: var(--ws-radius, 0.375rem);
    background: var(--ws-gray-50, #f8f9fa);
}

.webisport-dashboard .convocation-detail-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.webisport-dashboard .convocation-detail-stat-label {
    font-size: 11px;
    color: var(--ws-text-muted);
    margin-top: 2px;
}

.webisport-dashboard .convocation-detail-stat-success {
    background: rgba(40, 199, 111, 0.12);
}

.webisport-dashboard .convocation-detail-stat-success .convocation-detail-stat-value {
    color: var(--ws-success);
}

.webisport-dashboard .convocation-detail-stat-warning {
    background: rgba(255, 159, 67, 0.12);
}

.webisport-dashboard .convocation-detail-stat-warning .convocation-detail-stat-value {
    color: var(--ws-warning);
}

.webisport-dashboard .convocation-detail-stat-danger {
    background: rgba(234, 84, 85, 0.12);
}

.webisport-dashboard .convocation-detail-stat-danger .convocation-detail-stat-value {
    color: var(--ws-danger);
}

.webisport-dashboard .convocation-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--ws-space-4);
    align-items: start;
}

.webisport-dashboard .convocation-detail-grid > .webisport-card {
    min-width: 0;
}

/* ================================================
   Inline Player Search
   ================================================ */

.webisport-dashboard .convocation-player-search {
    margin-bottom: var(--ws-space-4);
}

.webisport-dashboard .convocation-player-search input {
    width: 100%;
}

/* ================================================
   Unified Player List (Flutter-style)
   ================================================ */

.webisport-dashboard .convocation-player-list {
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid var(--ws-border-light);
    border-radius: var(--ws-radius);
}

.webisport-dashboard .convocation-player-row {
    display: flex;
    align-items: center;
    gap: var(--ws-space-3);
    padding: var(--ws-space-3) var(--ws-space-4);
    border-bottom: 1px solid rgba(47, 43, 61, 0.08);
    transition: background-color 0.15s ease;
}

.webisport-dashboard .convocation-player-row:last-child {
    border-bottom: none;
}

.webisport-dashboard .convocation-player-row:hover {
    background-color: rgba(47, 43, 61, 0.04);
}

.webisport-dashboard .convocation-player-row.is-convoked {
    background-color: rgba(40, 199, 111, 0.16);
}

.webisport-dashboard .convocation-player-row.is-convoked:hover {
    background-color: rgba(40, 199, 111, 0.22);
}

/* Avatar */
.webisport-dashboard .convocation-player-avatar {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
}

.webisport-dashboard .convocation-player-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.webisport-dashboard .convocation-player-avatar .dashicons {
    width: 40px;
    height: 40px;
    font-size: 40px;
    line-height: 40px;
    color: var(--ws-text-muted);
}

/* Info */
.webisport-dashboard .convocation-player-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.webisport-dashboard .convocation-player-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--ws-gray-800);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.webisport-dashboard .convocation-player-licence {
    font-size: 12px;
    color: var(--ws-text-muted);
}

/* Toggle Button */
.webisport-dashboard .convocation-player-action {
    flex-shrink: 0;
}

/* Status Badge (clickable) */
.webisport-dashboard .convocation-player-status {
    flex-shrink: 0;
}

.webisport-dashboard .convocation-status-badge {
    cursor: pointer;
    transition: opacity 0.15s ease;
    font-size: 11px;
}

.webisport-dashboard .convocation-status-badge:hover {
    opacity: 0.8;
}

.webisport-dashboard .convocation-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
    padding: 0;
    background: transparent;
}

.webisport-dashboard .convocation-toggle-btn .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    line-height: 20px;
}

.webisport-dashboard .convocation-toggle-add {
    color: var(--ws-primary-ink);
    border-color: var(--ws-primary-border);
}

.webisport-dashboard .convocation-toggle-add:hover {
    background-color: var(--ws-primary);
    color: var(--ws-on-primary);
}

.webisport-dashboard .convocation-toggle-remove {
    color: var(--ws-danger);
    border-color: var(--ws-danger);
}

.webisport-dashboard .convocation-toggle-remove:hover {
    background-color: var(--ws-danger);
    color: #fff;
}

.webisport-dashboard .convocation-toggle-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ================================================
   Load More Button
   ================================================ */

.webisport-dashboard .convocation-load-more {
    text-align: center;
    padding: var(--ws-space-3) 0;
}

/* ================================================
   Hors Groupe Button Container
   ================================================ */

.webisport-dashboard .convocation-hors-groupe-container {
    text-align: center;
    padding: var(--ws-space-4) 0 0;
}

.webisport-dashboard .convocation-hors-groupe-container .webisport-btn {
    width: 100%;
    max-width: 320px;
}

/* ================================================
   Status Badges
   ================================================ */

.webisport-dashboard .convocation-status-ok,
.webisport-dashboard .convocation-status-present {
    background-color: rgba(40, 199, 111, 0.16);
    color: var(--ws-success);
    padding: 2px 10px;
    border-radius: 0.125rem;
    font-size: 12px;
    font-weight: 500;
}

.webisport-dashboard .convocation-status-ko,
.webisport-dashboard .convocation-status-absent {
    background-color: rgba(255, 76, 81, 0.16);
    color: var(--ws-danger);
    padding: 2px 10px;
    border-radius: 0.125rem;
    font-size: 12px;
    font-weight: 500;
}

.webisport-dashboard .convocation-status-pending {
    background-color: rgba(255, 159, 67, 0.16);
    color: var(--ws-warning);
    padding: 2px 10px;
    border-radius: 0.125rem;
    font-size: 12px;
    font-weight: 500;
}

/* ================================================
   Hour Rows (Details Form)
   ================================================ */

.webisport-dashboard .convocation-hour-row {
    display: flex;
    align-items: center;
    gap: var(--ws-space-2);
    margin-bottom: var(--ws-space-2);
    flex-wrap: wrap;
}

.webisport-dashboard .convocation-hour-row input[type="time"] {
    width: 140px;
    flex-shrink: 0;
}

.webisport-dashboard .convocation-hour-row input[type="text"] {
    flex: 1;
    min-width: 180px;
}

.webisport-dashboard .convocation-hour-row .webisport-btn-small {
    flex-shrink: 0;
}

/* ================================================
   Responsive
   ================================================ */

@media (max-width: 900px) {
    .webisport-dashboard .convocation-detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .webisport-dashboard .convocation-detail-header-row {
        gap: var(--ws-space-2);
    }

    .webisport-dashboard .convocation-detail-score {
        font-size: 1.5rem;
    }

    .webisport-dashboard .convocation-detail-header-title {
        font-size: 1.15rem;
    }

    .webisport-dashboard .convocation-hour-row {
        flex-direction: column;
        align-items: stretch;
    }

    .webisport-dashboard .convocation-hour-row input[type="time"] {
        width: 100%;
    }

    .webisport-dashboard .convocation-player-list {
        max-height: 400px;
    }

    .webisport-dashboard .convocation-player-row {
        padding: var(--ws-space-2) var(--ws-space-3);
    }

    .webisport-dashboard .convocation-player-avatar {
        width: 32px;
        height: 32px;
    }

    .webisport-dashboard .convocation-player-avatar img {
        width: 32px;
        height: 32px;
    }

    .webisport-dashboard .convocation-player-avatar .dashicons {
        width: 32px;
        height: 32px;
        font-size: 32px;
        line-height: 32px;
    }
}
