/* Delete Confirmation Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: var(--color-white);
    border-radius: 0.75rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease-out;
}

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

.modal-header {
    padding: 1.5rem 1.5rem 1rem;
    text-align: center;
    border-bottom: 1px solid var(--color-gray-200);
}

.modal-icon {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background-color: #fef2f2;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #dc2626;
}

.modal-icon svg {
    width: 32px;
    height: 32px;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
    margin: 0;
}

.modal-body {
    padding: 1.5rem;
}

.modal-body p {
    margin: 0 0 1rem 0;
    color: var(--color-text);
    font-size: 1rem;
    line-height: 1.5;
}

.modal-body p:last-child {
    margin-bottom: 0;
}

.modal-body strong {
    color: var(--color-text);
    font-weight: 600;
}

.modal-warning {
    color: #991b1b !important;
    font-size: 0.875rem !important;
    background-color: #fef2f2;
    padding: 0.75rem;
    border-radius: 0.5rem;
    border-left: 3px solid #dc2626;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    padding: 1rem 1.5rem 1.5rem;
    border-top: 1px solid var(--color-gray-200);
    justify-content: flex-end;
}

.modal-actions .btn {
    min-width: 120px;
}

.modal-cancel {
    flex: 0 0 auto;
}

.modal-confirm {
    flex: 0 0 auto;
}

@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 1rem;
    }

    .modal-actions {
        flex-direction: column-reverse;
    }

    .modal-actions .btn {
        width: 100%;
    }
}

/* Video Modal */
.modal-content-video {
    position: relative;
    max-width: 900px;
    padding: 0;
    overflow: hidden;
}

.modal-video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    background-color: #000;
}

.modal-video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Button Danger Styling */
.btn-danger {
    background-color: #dc2626;
    color: var(--color-white);
    border-color: #dc2626;
}

.btn-danger:hover {
    background-color: #b91c1c;
    border-color: #b91c1c;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

/* Ensure buttons inside forms are styled correctly */
form button.btn,
form button.btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 0.5rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-family: inherit;
    line-height: 1.5;
}

/* Dropdown Item Danger Styling */
.dropdown-item-danger {
    color: #dc2626 !important;
}

.dropdown-item-danger:hover {
    color: #b91c1c !important;
    background: #fef2f2 !important;
}

.dropdown-item-danger svg {
    color: #dc2626 !important;
    stroke: #dc2626 !important;
}

.dropdown-item-danger:hover svg {
    color: #b91c1c !important;
    stroke: #b91c1c !important;
}

/* Actions Dropdown Menu */
.actions-dropdown {
    position: relative;
}

.dropdown-toggle {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--color-gray-600);
    border-radius: 0.375rem;
    transition: background-color 0.2s ease, color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dropdown-toggle:hover {
    background: var(--color-gray-100);
    color: var(--color-text);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: var(--color-white);
    border: 1px solid var(--color-gray-200);
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    z-index: 10;
}

.dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--color-text);
    text-decoration: none;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid var(--color-gray-100);
}

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

.dropdown-item:hover {
    background: var(--color-gray-50);
}

.dropdown-item svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.dropdown-item-form {
    margin: 0;
}

.dropdown-item-form button.dropdown-item {
    width: 100%;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    font: inherit;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--color-gray-100);
}

.dropdown-item-form button.dropdown-item svg {
    flex-shrink: 0;
}

.dropdown-item-form button.dropdown-item:hover {
    background: var(--color-gray-50);
}

/* Ensure delete button in dropdown is red and overrides form styles */
.dropdown-item-form button.dropdown-item.dropdown-item-danger {
    color: #dc2626 !important;
}

.dropdown-item-form button.dropdown-item.dropdown-item-danger:hover {
    color: #b91c1c !important;
    background: #fef2f2 !important;
}

.dropdown-item-form button.dropdown-item.dropdown-item-danger svg {
    color: #dc2626 !important;
    stroke: #dc2626 !important;
}

.dropdown-item-form button.dropdown-item.dropdown-item-danger:hover svg {
    color: #b91c1c !important;
    stroke: #b91c1c !important;
}

.dropdown-menu > .dropdown-item-form:last-child button.dropdown-item {
    border-bottom: none;
}

@media (max-width: 768px) {
    .dropdown-menu {
        right: 0;
        left: auto;
        max-width: calc(100vw - 1rem);
        width: max-content;
        min-width: 180px;
        /* Ensure dropdown doesn't overflow viewport */
        box-sizing: border-box;
    }
}

/* Data Card Component */
.insight-card {
    background: var(--color-white);
    border: 1px solid var(--color-gray-200);
    border-radius: 1rem;
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    box-shadow: var(--shadow-sm);
    min-height: 240px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
}

.card-header h2 {
    font-size: 1.35rem;
    margin: 0;
}

.chip {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    background: var(--color-gray-100);
    color: var(--color-gray-600);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Empty States — shared across players, lessons, and dashboard */
.empty-state,
.empty-state-small {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
}

.empty-state svg,
.empty-state-small svg {
    display: block;
    flex-shrink: 0;
}

.empty-state-small {
    flex: 1;
    min-height: 0;
}

.empty-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex: 1;
    width: 100%;
    min-height: 0;
    margin: 0;
}

/* Fill card body height so empty states center vertically */
.card-body > .players-list,
.card-body > .empty-state-small,
.card-body > .empty-hint {
    flex: 1;
    min-height: 0;
}

/* Grouped Tags with Pills */
.tags-grouped-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1rem;
    border: 1px solid var(--color-gray-300);
    border-radius: 0.5rem;
    background: var(--color-gray-50);
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
}

.tag-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.tag-group-header {
    margin-bottom: 0.25rem;
}

.tag-group-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tags-pill-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.tag-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-gray-700);
    background-color: var(--color-white);
    border: 2px solid var(--color-gray-300);
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    position: relative;
}

.tag-pill:hover {
    background-color: var(--color-gray-50);
    border-color: var(--color-gray-400);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tag-pill-checkbox {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.tag-pill-text {
    display: inline-block;
}

.tag-pill-checkbox:checked + .tag-pill-text {
    color: var(--color-primary);
}

.tag-pill:has(.tag-pill-checkbox:checked) {
    background-color: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
    box-shadow: 0 2px 8px rgba(22, 163, 74, 0.3);
}

.tag-pill:has(.tag-pill-checkbox:checked):hover {
    background-color: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.4);
}

.tag-pill:has(.tag-pill-checkbox:checked) .tag-pill-text {
    color: var(--color-white);
}

/* Player Summary Card Component */
.player-summary-card {
    background: var(--color-white);
    border: 1px solid var(--color-gray-200);
    border-radius: 1rem;
    padding: 2rem;
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.1fr) auto;
    grid-template-areas:
        "identity contact actions"
        "tags contact actions";
    gap: 1rem 2.5rem;
    align-items: center;
    box-shadow: var(--shadow-sm);
}

.player-summary-card:not(:has(.player-tag-list)) {
    grid-template-areas: "identity contact actions";
}

.player-summary-card:not(:has(.player-summary-actions)) {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.1fr);
    grid-template-areas:
        "identity contact"
        "tags contact";
}

.player-summary-card:not(:has(.player-tag-list)):not(:has(.player-summary-actions)) {
    grid-template-areas: "identity contact";
}

/* Flatten header wrapper so ident + menu participate in the card grid (desktop) */
.player-summary-top {
    display: contents;
}

.player-ident {
    grid-area: identity;
    display: flex;
    gap: 1.5rem;
    align-items: center;
    min-width: 0;
}

.player-ident-text {
    min-width: 0;
}

.player-avatar {
    width: 72px;
    height: 72px;
    border-radius: 1.5rem;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-hover));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-white);
    text-transform: uppercase;
    box-shadow: var(--shadow-md);
    flex-shrink: 0;
}

.player-ident h1 {
    font-size: 2rem;
    margin: 0 0 0.25rem 0;
    color: var(--color-text);
    line-height: 1.2;
}

.player-joined {
    margin: 0;
    color: var(--color-gray-500);
    font-size: 0.95rem;
}

.player-summary-actions {
    grid-area: actions;
    align-self: center;
    justify-self: end;
}

.player-tag-list {
    grid-area: tags;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-self: start;
}

.player-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    background: var(--color-gray-100);
    color: var(--color-gray-700);
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.player-contact {
    grid-area: contact;
    display: grid;
    gap: 1rem;
    align-self: center;
    padding-left: 2rem;
    border-left: 1px solid var(--color-gray-200);
    min-width: 0;
}

.contact-item {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}

.contact-item .label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-gray-500);
    font-weight: 600;
}

.contact-item .value {
    font-size: 0.95rem;
    color: var(--color-text);
    word-break: break-word;
}

.contact-item .value a {
    color: inherit;
    text-decoration: none;
}

.contact-item .value a:hover {
    color: var(--color-primary);
}

.value-muted {
    color: var(--color-gray-400);
    font-style: italic;
}

@media (min-width: 769px) and (max-width: 1100px) {
    .player-summary-card {
        padding: 1.5rem;
        gap: 1rem 1.75rem;
        grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto;
    }

    .player-contact {
        padding-left: 1.5rem;
    }
}

@media (max-width: 768px) {
    .player-summary-card {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        padding: 1rem;
        border-radius: 0.625rem;
    }

    .player-summary-top {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        width: 100%;
        gap: 0.5rem;
    }

    .player-ident {
        flex: 1;
    }

    .player-summary-actions {
        align-self: flex-start;
        justify-self: auto;
    }

    .player-contact {
        padding-left: 0;
        border-left: none;
    }

    .player-ident {
        align-items: flex-start;
        gap: 0.75rem;
    }

    .player-avatar {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
        border-radius: 0.75rem;
    }

    .player-ident h1 {
        font-size: 1.125rem;
    }

    .player-joined {
        font-size: 0.8125rem;
    }

    .player-summary-actions .dropdown-toggle {
        width: 2.25rem;
        height: 2.25rem;
        padding: 0;
    }

    .player-summary-actions .dropdown-toggle svg {
        width: 18px;
        height: 18px;
    }

    .player-tag-list {
        gap: 0.375rem;
        margin: 0;
    }

    .player-tag {
        padding: 0.125rem 0.5rem;
        font-size: 0.6875rem;
    }

    .player-contact {
        width: 100%;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.5rem;
        padding-top: 0.75rem;
        margin-top: 0.125rem;
        border-top: 1px solid var(--color-gray-200);
        align-self: stretch;
    }

    .contact-item {
        gap: 0.125rem;
    }

    .contact-item .label {
        font-size: 0.625rem;
        letter-spacing: 0.05em;
    }

    .contact-item .value {
        font-size: 0.75rem;
        line-height: 1.35;
    }

    .contact-item .value a {
        word-break: break-all;
    }

    .value-muted {
        font-size: 0.6875rem;
    }
}

@media (max-width: 480px) {
    .player-summary-card {
        padding: 0.875rem;
        gap: 0.625rem;
    }

    .player-avatar {
        width: 44px;
        height: 44px;
        font-size: 1.125rem;
    }

    .player-ident h1 {
        font-size: 1rem;
    }

    .player-contact {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .contact-item {
        flex-direction: row;
        align-items: baseline;
        justify-content: space-between;
        gap: 0.5rem;
        padding: 0.375rem 0;
        border-bottom: 1px solid var(--color-gray-100);
    }

    .contact-item:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

    .contact-item .label {
        flex-shrink: 0;
    }

    .contact-item .value {
        text-align: right;
        font-size: 0.8125rem;
    }
}

/* Lesson Attachment Card Component */
.attachments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.attachment-card {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    background: var(--color-white);
    border: 1px solid var(--color-gray-200);
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    gap: 0.75rem;
}

.attachment-card:hover {
    border-color: var(--color-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.attachment-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--color-gray-50);
    border-radius: 0.375rem;
    color: var(--color-primary);
    margin-bottom: 0.25rem;
}

.attachment-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.attachment-name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--color-text);
    margin: 0;
    word-break: break-word;
}

.attachment-type {
    font-size: 0.8125rem;
    color: var(--color-gray-600);
    text-transform: capitalize;
}

.attachment-date {
    font-size: 0.75rem;
    color: var(--color-gray-500);
}

.attachment-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--color-gray-100);
}

.attachment-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.375rem;
    color: var(--color-gray-600);
    text-decoration: none;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
    background: transparent;
    border: none;
    cursor: pointer;
}

.attachment-action-btn:hover {
    background: var(--color-gray-50);
    color: var(--color-primary);
}

.attachment-delete-btn:hover {
    background: #fee;
    color: #dc3545;
}

@media (max-width: 768px) {
    .attachments-grid {
        grid-template-columns: 1fr;
    }
}

/* Tab Navigation Component */
.tab-navigation {
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--color-gray-200);
}

.tab-list {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.tab-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--color-gray-600);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s ease;
    position: relative;
    white-space: nowrap;
}

.tab-item:hover {
    color: var(--color-text);
    background-color: var(--color-gray-50);
    border-radius: 0.5rem 0.5rem 0 0;
}

.tab-item-active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
    background-color: transparent;
}

.tab-item-active:hover {
    color: var(--color-primary);
    background-color: transparent;
}

.tab-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tab-icon svg {
    width: 18px;
    height: 18px;
}

.tab-label {
    display: inline-block;
}

@media (max-width: 768px) {
    .tab-navigation {
        margin-bottom: 1rem;
    }

    .tab-list {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        gap: 0.25rem;
    }

    .tab-list::-webkit-scrollbar {
        display: none;
    }

    .tab-item {
        flex-shrink: 0;
        padding: 0.5rem 0.75rem;
        font-size: 0.8125rem;
        gap: 0.375rem;
    }

    .tab-icon svg {
        width: 14px;
        height: 14px;
    }
}

@media (max-width: 480px) {
    .tab-item {
        padding: 0.4375rem 0.625rem;
        font-size: 0.75rem;
    }
}

/* Player Item Card Component */
.players-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1;
    min-height: 0;
    position: relative;
}

.player-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border: 1px solid var(--color-gray-200);
    border-radius: 0.5rem;
    text-decoration: none;
    color: var(--color-text);
    transition: all 0.2s ease;
    background: var(--color-white);
    flex-shrink: 0;
}

.player-item:hover {
    border-color: var(--color-primary);
    background: var(--color-gray-50);
    box-shadow: var(--shadow-sm);
}

.player-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--color-primary);
    color: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9375rem;
    flex-shrink: 0;
}

.player-avatar-medium {
    width: 44px;
    height: 44px;
    font-size: 1.125rem;
}

.player-avatar-large {
    width: 52px;
    height: 52px;
    font-size: 1.25rem;
}

.player-avatar-inactive {
    background: var(--color-gray-400);
}

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

.player-name {
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.25rem;
    font-size: 0.9375rem;
}

.player-handicap {
    font-size: 0.8125rem;
    color: var(--color-gray-600);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.player-focus {
    font-size: 0.8125rem;
    color: var(--color-gray-600);
    font-weight: 500;
    margin-bottom: 0.25rem;
    font-style: italic;
}

.player-tags-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-top: 0.375rem;
}

.tag-small {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    background: var(--color-gray-100);
    color: var(--color-gray-700);
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.player-arrow {
    color: var(--color-gray-400);
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.player-item:hover .player-arrow {
    color: var(--color-primary);
    transform: translateX(4px);
}

/* Responsive adjustments for player items */
@media (max-width: 768px) {
    .player-item {
        padding: 0.625rem;
        gap: 0.625rem;
    }

    .player-avatar {
        width: 32px;
        height: 32px;
        font-size: 0.875rem;
    }

    .player-avatar-medium {
        width: 36px;
        height: 36px;
        font-size: 0.9375rem;
    }

    .player-avatar-large {
        width: 44px;
        height: 44px;
        font-size: 1.125rem;
    }
}

/* Help Icon Component */
.help-icon-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.help-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    color: var(--color-gray-500);
    border-radius: 50%;
    transition: all 0.2s ease;
    line-height: 1;
}

.help-icon-btn:hover {
    color: var(--color-primary);
    background-color: var(--color-gray-100);
}

.help-icon-btn:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.help-icon-sm svg {
    width: 14px;
    height: 14px;
}

.help-icon-md svg {
    width: 16px;
    height: 16px;
}

.help-icon-lg svg {
    width: 18px;
    height: 18px;
}

.help-popover {
    position: absolute;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
}

.help-popover.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.help-popover-content {
    background: var(--color-white);
    border: 1px solid var(--color-gray-200);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-width: 280px;
    min-width: 200px;
}

.help-popover-content-wide {
    max-width: min(22rem, calc(100vw - 2rem));
    min-width: 16rem;
    padding: 0.875rem 1rem 1rem;
}

.help-popover-text {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--color-text);
}

.help-popover-arrow {
    position: absolute;
    width: 0;
    height: 0;
    border-style: solid;
}

/* Top position (default) */
.help-popover-top {
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    margin-bottom: 0.5rem;
}

.help-popover-top.active {
    transform: translateX(-50%) translateY(0);
}

.help-popover-top .help-popover-arrow {
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 0 6px 6px 6px;
    border-color: transparent transparent var(--color-white) transparent;
}

.help-popover-top .help-popover-arrow::before {
    content: '';
    position: absolute;
    top: 1px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 6px 6px 6px;
    border-color: transparent transparent var(--color-gray-200) transparent;
    z-index: -1;
}

/* Bottom position */
.help-popover-bottom {
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    margin-top: 0.5rem;
}

.help-popover-bottom.active {
    transform: translateX(-50%) translateY(0);
}

.help-popover-bottom .help-popover-arrow {
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px 6px 0 6px;
    border-color: var(--color-white) transparent transparent transparent;
}

.help-popover-bottom .help-popover-arrow::before {
    content: '';
    position: absolute;
    bottom: 1px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 6px 6px 0 6px;
    border-color: var(--color-gray-200) transparent transparent transparent;
    z-index: -1;
}

/* Left position */
.help-popover-left {
    right: 100%;
    top: 50%;
    transform: translateY(-50%) translateX(-8px);
    margin-right: 0.5rem;
}

.help-popover-left.active {
    transform: translateY(-50%) translateX(0);
}

.help-popover-left .help-popover-arrow {
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    border-width: 6px 0 6px 6px;
    border-color: transparent transparent transparent var(--color-white);
}

.help-popover-left .help-popover-arrow::before {
    content: '';
    position: absolute;
    left: 1px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 6px 0 6px 6px;
    border-color: transparent transparent transparent var(--color-gray-200);
    z-index: -1;
}

/* Right position */
.help-popover-right {
    left: 100%;
    top: 50%;
    transform: translateY(-50%) translateX(8px);
    margin-left: 0.5rem;
}

.help-popover-right.active {
    transform: translateY(-50%) translateX(0);
}

.help-popover-right .help-popover-arrow {
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    border-width: 6px 6px 6px 0;
    border-color: transparent var(--color-white) transparent transparent;
}

.help-popover-right .help-popover-arrow::before {
    content: '';
    position: absolute;
    right: 1px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 6px 6px 6px 0;
    border-color: transparent var(--color-gray-200) transparent transparent;
    z-index: -1;
}

@media (max-width: 768px) {
    .help-popover-content {
        max-width: 240px;
        min-width: 180px;
    }
}
