/* Doubles Pair Details Modal Styles */

/* Modal Structure */
#doubles-pair-details-modal {
    z-index: 1100; /* Higher than the team fixtures modal */
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow-y: auto;
}

#doubles-pair-details-modal .modal-content {
    max-width: 800px;
    width: 100%;
    min-width: 320px;
    max-height: 95vh;
    height: 95%;
    margin: 5vh auto;
    position: relative;
    background: #fff;
    flex-direction: column;
    padding: 0;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
    from {opacity: 0; transform: translateY(-20px);}
    to {opacity: 1; transform: translateY(0);}
}

#doubles-pair-details-modal .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px 12px 24px;
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--primary, #2c3e50);
    color: white;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

#doubles-pair-details-modal .modal-body {
    overflow-y: visible;
    max-height: none;
    padding: 18px 24px 18px 24px;
}

#doubles-pair-details-modal h2 {
    margin: 0;
    font-size: 1.4em;
    color: white;
}

#doubles-pair-details-modal .close-button {
    background: none;
    border: none;
    font-size: 2rem;
    color: white;
    cursor: pointer;
    z-index: 2;
    transition: color 0.2s;
    margin-left: 12px;
}

#doubles-pair-details-modal .close-button:hover {
    color: #ddd;
}

/* Loading spinner */
#doubles-pair-details-modal .loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    color: #666;
}

#doubles-pair-details-modal .spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #c44f00;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Pair details */
#doubles-pair-details-modal .detail-section {
    margin-bottom: 20px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

#doubles-pair-details-modal h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.2em;
    color: #333;
    border-bottom: 1px solid #ddd;
    padding-bottom: 8px;
}

#doubles-pair-details-modal .player-info-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

#doubles-pair-details-modal .player-info-column {
    flex: 1;
    min-width: 200px;
}

#doubles-pair-details-modal .detail-row {
    display: flex;
    margin-bottom: 10px;
}

#doubles-pair-details-modal .detail-label {
    font-weight: 600;
    width: 140px;
    color: #555;
}

#doubles-pair-details-modal .detail-value {
    flex: 1;
    color: #333;
}

/* Games List */
#doubles-pair-details-modal .games-list {
    margin-top: 10px;
}

#doubles-pair-details-modal .pair-game {
    background-color: white;
    border-radius: 6px;
    padding: 2px 2px 2px 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 2px;
    transition: all 0.2s ease;
}

#doubles-pair-details-modal .pair-game:hover {
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

#doubles-pair-details-modal .game-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px;
}

#doubles-pair-details-modal .game-info {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

#doubles-pair-details-modal .game-date {
    color: #666;
    font-size: 0.9em;
}

#doubles-pair-details-modal .game-fixture {
    font-weight: 500;
}

#doubles-pair-details-modal .game-result-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

#doubles-pair-details-modal .game-result {
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
}

#doubles-pair-details-modal .game-result.win {
    background-color: rgba(46, 204, 113, 0.2);
    color: #27ae60;
}

#doubles-pair-details-modal .game-result.loss {
    background-color: rgba(231, 76, 60, 0.2);
    color: #c0392b;
}

#doubles-pair-details-modal .fixture-link {
    color: var(--primary, #2c3e50);
    text-decoration: none;
    cursor: pointer;
}

#doubles-pair-details-modal .fixture-link:hover {
    text-decoration: underline;
}

#doubles-pair-details-modal .fixture-accordion {
    padding: 0 10px 10px;
}

/* Doubles pair styling in the rankings table */
.doubles-pair {
    cursor: pointer;
    padding: 2px 5px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.doubles-pair:hover {
    background-color: rgba(44, 62, 80, 0.1);
}

.doubles-pair .pair-player-name {
    font-weight: 500;
    color: #2c3e50;
}

.doubles-pair .pair-separator {
    margin: 0 5px;
    color: #666;
}

.first-player-line {
    display: flex;
    align-items: center;
}
