/* Pitch Design In-House - Match .IH-dashboard exactly but scoped to .PD-IH-dashboard */
.PD-IH-dashboard {
    padding: 1rem;
    max-width: 1200px;
    margin: 0 auto;
    color: #ffffff;
    background-color: #1a1a1a;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}
/* Pitch Design In-House: Player Search Bar and Date Range styles, scoped to .PD-IH-dashboard */
.PD-IH-dashboard .search-section {
    margin: 2rem 0;
    text-align: center;
}
.PD-IH-dashboard #pd-ih-controls {
    display: flex;
    justify-content: center;
    margin-top: 1.75rem;
}
.PD-IH-dashboard .pd-ih-pitch-types {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    width: 100%;
}
.PD-IH-dashboard .search-bar {
    position: relative;
    display: inline-block;
}
.PD-IH-dashboard .search-bar input {
    width: 300px;
    padding: 12px;
    font-size: 16px;
    border: 1px solid #444;
    border-radius: 4px;
    background-color: #2a2a2a;
    color: #fff;
}
.PD-IH-dashboard .search-bar input::placeholder {
    color: #888;
}
.PD-IH-dashboard .suggestion-box {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #2a2a2a;
    border: 1px solid #444;
    border-top: none;
    border-radius: 0 0 4px 4px;
    min-height: 0;
    max-height: 360px;
    overflow-y: auto;
    z-index: 3000;
    display: none;
    width: 100%;
}
.PD-IH-dashboard .suggestion-box div {
    padding: 8px 12px;
    cursor: pointer;
    color: #fff;
}
.PD-IH-dashboard .suggestion-box div:hover {
    background-color: #3a3a3a;
}
.PD-IH-dashboard .suggestion-box div.selected {
    background-color: #444;
}
.PD-IH-dashboard .date-range-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.PD-IH-dashboard .date-input-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}
.PD-IH-dashboard .date-input-group label {
    color: #ccc;
    font-size: 14px;
}
.PD-IH-dashboard .date-input {
    padding: 8px;
    border: 1px solid #444;
    border-radius: 4px;
    background-color: #2a2a2a;
    color: #fff;
    font-size: 14px;
}
.PD-IH-dashboard .date-input:focus {
    outline: none;
    border-color: #666;
    box-shadow: none;
}
.PD-IH-dashboard .date-update-btn {
    padding: 8px 16px;
    background-color: #2196f3;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s ease;
    margin-top: 0.5em;
    margin-bottom: 0;
    display: block;
}
.PD-IH-dashboard .date-update-btn:hover {
    background-color: #1976d2;
}
.PD-IH-dashboard .date-update-btn:active {
    background-color: #1565c0;
}
.PD-IH-dashboard .pd-ih-pitch-type-section {
    margin-top: 22px;
    text-align: center;
}
.PD-IH-dashboard .pd-ih-pitch-type-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 14px;
    font-size: 1.15rem;
}
.PD-IH-dashboard .pd-ih-pitch-type-label {
    font-weight: 600;
    color: #fff;
    margin-right: 10px;
}
.PD-IH-dashboard .pd-ih-pitch-type-message {
    color: #bbb;
    padding: 8px 0;
    text-align: center;
}
.PD-IH-dashboard .pd-ih-pitch-type-message.loading {
    color: #96caff;
}
.PD-IH-dashboard .pd-ih-pitch-type-message.warning {
    color: #e9c46a;
}
.PD-IH-dashboard .pd-ih-pitch-type-message.error {
    color: #ff6b6b;
}
.PD-IH-dashboard .filter-select {
    appearance: none;
    background-color: #222;
    border: 2px solid #444;
    color: #fff;
    border-radius: 8px;
    font-size: 16px;
    padding: 8px 16px;
}
.PD-IH-dashboard .filter-select:focus {
    outline: none;
    border-color: #666;
    box-shadow: 0 0 0 2px rgba(255,255,255,0.09);
}
.PD-IH-dashboard .pd-ih-message {
    text-align: center;
    color: #d7d7d7;
    margin-top: 1.25rem;
    font-size: 1rem;
}
.PD-IH-dashboard .pd-ih-chart-section {
    margin: 2.5rem auto 1.5rem auto;
    padding: 1.5rem;
    background: rgba(12, 17, 27, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    max-width: 1200px;
    width: 100%;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}
.PD-IH-dashboard .pd-ih-chart-status {
    color: #c3d5f5;
    font-size: 1rem;
    min-height: 24px;
    text-align: center;
}
.PD-IH-dashboard #pd-ih-movement-chart {
    background: radial-gradient(circle at top, rgba(255,255,255,0.08), rgba(10,15,25,0.85));
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.08);
    width: 100%;
    max-width: 650px;
    height: 650px;
    display: block;
    margin: 0 auto;
}
.PD-IH-dashboard .pd-ih-summary {
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 0.5rem 0;
}

.PD-IH-dashboard .ih-modal-metrics-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(12, 18, 31, 0.72);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.PD-IH-dashboard .ih-modal-metrics-table th,
.PD-IH-dashboard .ih-modal-metrics-table td {
    padding: 10px 12px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    color: #f3f7ff;
}

.PD-IH-dashboard .ih-modal-metrics-table th:first-child,
.PD-IH-dashboard .ih-modal-metrics-table td:first-child {
    text-align: left;
    padding-left: 16px;
}

.PD-IH-dashboard .ih-modal-metrics-table th {
    background: rgba(40, 62, 98, 0.6);
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.PD-IH-dashboard .ih-modal-metrics-table tbody tr:last-child td {
    border-bottom: none;
}

.PD-IH-dashboard .ih-modal-metrics-table td {
    font-weight: 600;
}

/* Pitch type badge styling matching In House */
.PD-IH-dashboard .pitch-type {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    color: #fff;
    font-weight: bold;
}
.PD-IH-dashboard .pd-ih-debug-log {
    width: 100%;
    margin-top: 1rem;
    padding: 14px 16px;
    background: rgba(12, 20, 30, 0.9);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    font-family: "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.85rem;
    color: #9bb2d1;
    max-height: 180px;
    overflow-y: auto;
    white-space: pre-wrap;
    line-height: 1.45;
}
.PD-IH-dashboard .pd-ih-cp-section {
    width: 100%;
    margin-top: 1rem;
}

/* CP Header with Info Icon */
.PD-IH-dashboard .pd-ih-cp-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 1rem;
}

.PD-IH-dashboard .pd-ih-cp-info-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(123, 214, 255, 0.2);
    border: 1px solid rgba(123, 214, 255, 0.4);
    color: #7bd6ff;
    text-align: center;
    line-height: 18px;
    font-size: 14px;
    font-weight: bold;
    cursor: help;
    transition: all 0.3s ease;
}

.PD-IH-dashboard .pd-ih-cp-info-icon:hover {
    background: rgba(123, 214, 255, 0.3);
    border-color: rgba(123, 214, 255, 0.6);
    transform: scale(1.1);
}

/* Tooltip */
.PD-IH-dashboard .pd-ih-cp-tooltip {
    position: absolute;
    top: -60px;
    left: 0;
    background: rgba(15, 25, 40, 0.95);
    border: 1px solid rgba(123, 214, 255, 0.3);
    border-radius: 8px;
    padding: 12px;
    min-width: 300px;
    color: #e0f0ff;
    font-size: 13px;
    line-height: 1.4;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1001;
    pointer-events: none;
}

.PD-IH-dashboard .pd-ih-cp-info-icon:hover + .pd-ih-cp-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.PD-IH-dashboard .pd-ih-cp-tooltip strong {
    color: #7bd6ff;
    font-weight: 600;
}

/* Tooltip arrow */
.PD-IH-dashboard .pd-ih-cp-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 15px;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid rgba(15, 25, 40, 0.95);
}
.PD-IH-dashboard .pd-ih-cp-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    width: 100%;
    justify-items: center;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

/* Center the 7th (last) plot */
.PD-IH-dashboard .pd-ih-cp-grid .pd-ih-cp-card:nth-child(7) {
    grid-column: 1 / -1;
    justify-self: center;
    align-self: center;
    max-width: 550px;
    min-width: 450px;
    margin: 0 auto;
}
.PD-IH-dashboard .pd-ih-cp-card {
    background: rgba(15, 22, 32, 0.9);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 320px;
    width: 100%;
    max-width: 550px;
    min-width: 450px;
    text-align: center;
}
.PD-IH-dashboard .pd-ih-cp-card__title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #f0f4ff;
    text-align: center;
    width: 100%;
}

/* Center canvas elements within CP cards */
.PD-IH-dashboard .pd-ih-cp-card canvas {
    display: block;
    margin: 0 auto;
}
.PD-IH-dashboard .pd-ih-cp-card__empty {
    color: #9aa7c0;
    font-size: 0.9rem;
    text-align: center;
    margin: auto;
}
/* Interactive Pitch Design Widgets */

/* Pitch Averages Table Wrapper */
.pitch-averages-table-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 960px;
    margin: 0 auto 1.5rem auto;
    gap: 0.75rem;
    padding: 0 1rem;
}

.PD-IH-dashboard .pitch-averages-table {
    width: 100%;
    margin: 0 auto;
    table-layout: fixed;
}

.PD-IH-dashboard .pd-ih-summary > * {
    margin: 0 auto;
}

.PD-IH-dashboard .pd-ih-summary .pitch-averages-table-wrapper {
    display: flex !important;
}

.PD-IH-dashboard .pd-ih-summary .ih-modal-metrics-table {
    margin: 0 !important;
}

.PD-IH-dashboard .pd-ih-summary {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 1.5rem auto 1rem;
    text-align: center;
    gap: 0.75rem;
}

/* Small Red Reset Button */
.reset-averages-btn-small {
    align-self: flex-end;
    background: linear-gradient(135deg, rgba(255, 106, 86, 0.9), rgba(232, 57, 57, 0.95));
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 9px 22px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.4px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 12px rgba(255, 106, 86, 0.35);
    white-space: nowrap;
}

.reset-averages-btn-small:hover {
    transform: translateY(-1px) scale(1.03);
    box-shadow: 0 6px 16px rgba(255, 106, 86, 0.45);
}

.reset-averages-btn-small:active {
    transform: translateY(1px) scale(0.98);
}

/* Editable Table Cells */
.PD-IH-dashboard .editable-cell {
    cursor: pointer !important;
    position: relative;
    transition: all 0.2s ease;
    background-color: rgba(100, 149, 237, 0.1) !important;
    border: 1px solid rgba(100, 149, 237, 0.3) !important;
}

.PD-IH-dashboard .editable-cell:hover {
    background-color: rgba(100, 149, 237, 0.2) !important;
    border-color: rgba(100, 149, 237, 0.5) !important;
    transform: scale(1.02);
}


/* Slider Widgets Container */
.slider-widgets-container {
    position: relative;
    margin: 15px auto 0 auto;
    width: 100%;
    max-width: 960px;
    min-height: 120px;
    display: block; /* maintain absolute positioning of widgets */
    z-index: 1500;
}

/* Individual Slider Widget */
.slider-widget {
    background: linear-gradient(145deg, rgba(25, 35, 50, 0.98), rgba(15, 25, 40, 0.98));
    backdrop-filter: blur(12px);
    border: 1px solid rgba(100, 149, 237, 0.4);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), 0 8px 16px rgba(100, 149, 237, 0.2);
    animation: slideIn 0.3s ease-out;
    margin-top: 10px;
    position: absolute;
    z-index: 2000;
    min-width: 250px;
    transition: all 0.3s ease;
}

.slider-widget:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.7), 0 12px 24px rgba(100, 149, 237, 0.3);
    border-color: rgba(100, 149, 237, 0.6);
}

/* Arrow pointing up to the column */
.slider-widget::before {
    content: "";
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid rgba(100, 149, 237, 0.8);
    filter: drop-shadow(0 -2px 4px rgba(0, 0, 0, 0.3));
}

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

.slider-widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.slider-widget-header label {
    color: #e0f0ff;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.slider-value {
    color: #7bd6ff;
    font-weight: 700;
    font-size: 16px;
    background: rgba(123, 214, 255, 0.1);
    padding: 4px 12px;
    border-radius: 6px;
    border: 1px solid rgba(123, 214, 255, 0.3);
}

/* Custom Range Slider */
.pitch-design-slider {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: linear-gradient(to right, rgba(130, 205, 246, 0.3), rgba(255, 106, 86, 0.3));
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    margin: 8px 0;
    cursor: pointer;
}

.pitch-design-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7bd6ff, #4eb8ff);
    cursor: pointer;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 8px rgba(123, 214, 255, 0.4);
    transition: all 0.2s ease;
}

.pitch-design-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(123, 214, 255, 0.6);
}

.pitch-design-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7bd6ff, #4eb8ff);
    cursor: pointer;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 8px rgba(123, 214, 255, 0.4);
    transition: all 0.2s ease;
}

.pitch-design-slider::-moz-range-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(123, 214, 255, 0.6);
}

.slider-range {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    font-size: 12px;
    color: #a0b8d0;
}

.range-min, .range-max {
    font-weight: 500;
}

/* Loading Spinner for Pitch Design */
.pitch-design-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 15, 25, 0.85);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    border-radius: 16px;
}

.pitch-design-loading-overlay .spinner {
    border: 4px solid rgba(123, 214, 255, 0.2);
    border-left-color: #7bd6ff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

.pitch-design-loading-overlay .loading-text {
    color: #e0f0ff;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

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

/* Enhanced Table Styling for Interactive Elements */
.PD-IH-dashboard .pitch-averages-table {
    position: relative;
    overflow: visible;
}

.PD-IH-dashboard .pitch-averages-table th {
    position: relative;
}

.PD-IH-dashboard .pitch-averages-table th:after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #7bd6ff, #ff6a56);
    transition: width 0.3s ease;
}

.PD-IH-dashboard .pitch-averages-table:hover th:after {
    width: 80%;
}

/* Responsive Design for Sliders */
@media (max-width: 768px) {
    .PD-IH-dashboard .date-range-container {
        flex-direction: column;
        gap: 15px;
    }
    .PD-IH-dashboard .search-bar input {
        width: 250px;
    }
    .PD-IH-dashboard .pd-ih-chart-section {
        padding: 1.25rem;
    }
    .PD-IH-dashboard .pd-ih-cp-grid {
        grid-template-columns: 1fr;
        max-width: 100%;
    }
    .PD-IH-dashboard .pd-ih-cp-card {
        min-width: 320px;
        max-width: 100%;
        margin: 0 auto;
    }
    .PD-IH-dashboard .pd-ih-cp-grid .pd-ih-cp-card:nth-child(7) {
        max-width: 100%;
        min-width: 320px;
        margin: 0 auto;
        justify-self: center;
        grid-column: 1 / -1;
    }
    .PD-IH-dashboard .ih-modal-metrics-table th,
    .PD-IH-dashboard .ih-modal-metrics-table td {
        padding: 8px 10px;
        font-size: 0.8rem;
    }
    .PD-IH-dashboard .pd-ih-summary {
        overflow-x: auto;
    }
    .PD-IH-dashboard .ih-modal-metrics-table {
        min-width: 520px;
    }
    .PD-IH-dashboard .ih-modal-metrics-table th,
    .PD-IH-dashboard .ih-modal-metrics-table td {
        white-space: nowrap;
    }
    
    .slider-widgets-container {
        margin: 15px 10px 0 10px;
        gap: 10px;
        min-height: 80px;
    }
    
    .slider-widget {
        padding: 16px;
        min-width: 220px;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 4px 12px rgba(100, 149, 237, 0.15);
    }
    
    .slider-widget-header {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
    
    .slider-value {
        font-size: 14px;
        padding: 3px 8px;
    }
    
    /* Adjust reset button position on mobile */
    .reset-averages-btn-small {
        align-self: center;
        font-size: 12px;
        padding: 8px 18px;
    }
    
    /* On mobile, keep floating but reduce intensity */
    .slider-widget {
        position: absolute !important;
        z-index: 1800 !important;
        backdrop-filter: blur(8px);
    }
}

/* -------------------- Custom Pitch Design -------------------- */
.pd-custom-dashboard {
    display: flex;
    flex-direction: column;
    gap: 32px;
    align-items: center;
}

/* Custom Dashboard CP Grid Layout - Same as IN House */
.pd-custom-dashboard .pd-ih-cp-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    width: 100%;
    justify-items: center;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

/* Center the 7th (last) plot in custom dashboard */
.pd-custom-dashboard .pd-ih-cp-grid .pd-ih-cp-card:nth-child(7) {
    grid-column: 1 / -1;
    justify-self: center;
    align-self: center;
    max-width: 550px;
    min-width: 450px;
    margin: 0 auto;
}

.pd-custom-dashboard .pd-ih-cp-card {
    background: rgba(15, 22, 32, 0.9);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 320px;
    width: 100%;
    max-width: 550px;
    min-width: 450px;
    text-align: center;
}

.pd-custom-dashboard .pd-ih-cp-card__title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #f0f4ff;
    text-align: center;
    width: 100%;
}

.pd-custom-dashboard .pd-ih-cp-card canvas {
    display: block;
    margin: 0 auto;
}

.pd-custom-dashboard .pd-ih-cp-card__empty {
    color: #9aa7c0;
    font-size: 0.9rem;
    text-align: center;
    margin: auto;
}

/* Custom Dashboard CP Section */
.pd-custom-dashboard .pd-ih-cp-section {
    width: 100%;
    margin-top: 1rem;
}

.pd-custom-dashboard .pd-ih-cp-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 1rem;
}

.pd-custom-dashboard .pd-ih-cp-info-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(123, 214, 255, 0.2);
    border: 1px solid rgba(123, 214, 255, 0.4);
    color: #7bd6ff;
    text-align: center;
    line-height: 18px;
    font-size: 14px;
    font-weight: bold;
    cursor: help;
    transition: all 0.3s ease;
}

.pd-custom-dashboard .pd-ih-cp-info-icon:hover {
    background: rgba(123, 214, 255, 0.3);
    border-color: rgba(123, 214, 255, 0.6);
    transform: scale(1.1);
}

.pd-custom-dashboard .pd-ih-cp-tooltip {
    position: absolute;
    top: -60px;
    left: 0;
    background: rgba(15, 25, 40, 0.95);
    border: 1px solid rgba(123, 214, 255, 0.3);
    border-radius: 8px;
    padding: 12px;
    min-width: 300px;
    color: #e0f0ff;
    font-size: 13px;
    line-height: 1.4;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1001;
    pointer-events: none;
}

.pd-custom-dashboard .pd-ih-cp-info-icon:hover + .pd-ih-cp-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.pd-custom-dashboard .pd-ih-cp-tooltip strong {
    color: #7bd6ff;
    font-weight: 600;
}

.pd-custom-dashboard .pd-ih-cp-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 15px;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid rgba(15, 25, 40, 0.95);
}

.pd-custom-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    background: rgba(25, 35, 50, 0.7);
    padding: 20px;
    border-radius: 16px;
    border: 1px solid rgba(123, 214, 255, 0.15);
    width: fit-content;
    max-width: 600px;
    margin: 0 auto;
}

.pd-custom-control {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 160px;
}

.pd-custom-pitch-select {
    align-items: center;
    text-align: center;
    min-width: 200px;
}

.pd-custom-pitch-select label {
    font-size: 1rem !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    margin-bottom: 8px;
}

.pd-custom-pitch-select select {
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    padding: 12px 16px !important;
    min-width: 200px;
    text-align: center;
    border: 2px solid rgba(123, 214, 255, 0.4) !important;
}

.pd-custom-secondary-controls {
    display: flex;
    gap: 20px;
    align-items: flex-end;
    justify-content: center;
    flex-wrap: wrap;
}

.pd-custom-control label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #9fbfe3;
    letter-spacing: 0.5px;
}

.pd-custom-control select,
.pd-custom-control input[type="number"],
.pd-custom-control input[type="text"] {
    background: rgba(10, 18, 30, 0.85);
    border: 1px solid rgba(123, 214, 255, 0.25);
    border-radius: 10px;
    padding: 10px 14px;
    color: #ffffff;
    font-size: 0.95rem;
    outline: none;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.pd-custom-control select:focus,
.pd-custom-control input[type="number"]:focus,
.pd-custom-control input[type="text"]:focus {
    border-color: rgba(255, 106, 86, 0.5);
    box-shadow: 0 0 0 2px rgba(255, 106, 86, 0.2);
}

.pd-custom-checkbox {
    flex: 1 1 auto;
    display: flex;
    align-items: flex-end;
}

.pd-custom-checkbox input[type="checkbox"] {
    margin-right: 10px;
    accent-color: #ff6a56;
}

.pd-custom-checkbox input[type="checkbox"]:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pd-custom-control:has(input[type="checkbox"]:disabled) {
    opacity: 0.5;
    cursor: not-allowed;
}

.pd-custom-control:has(input[type="checkbox"]:disabled) label {
    color: rgba(255, 255, 255, 0.4) !important;
    cursor: not-allowed;
}

.pd-custom-profiles {
    display: flex;
    gap: 16px;
    justify-content: center;
    align-items: stretch;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.pd-custom-profile-card {
    background: linear-gradient(150deg, rgba(15, 25, 40, 0.92), rgba(10, 18, 30, 0.92));
    border: 1px solid rgba(123, 214, 255, 0.2);
    border-radius: 18px;
    padding: 8px 12px;
    box-shadow: 0 18px 35px rgba(0, 0, 0, 0.45);
    position: relative;
    width: fit-content;
    min-width: 280px;
    height: fit-content;
    align-self: stretch;
}

.pd-custom-profile-card .pitch-averages-table-wrapper {
    width: 100%;
    overflow-x: auto;
    margin: 0;
    gap: 0;
    padding: 0;
}

.pd-custom-profile-card .ih-modal-metrics-table {
    width: 100%;
    min-width: fit-content;
    table-layout: auto;
    margin: 0;
    border-spacing: 0;
    border-collapse: collapse;
}

.pd-custom-profile-card .ih-modal-metrics-table th,
.pd-custom-profile-card .ih-modal-metrics-table td {
    margin: 0;
    padding: 8px 10px;
}

.pd-custom-profile-card .ih-modal-metrics-table thead,
.pd-custom-profile-card .ih-modal-metrics-table tbody {
    margin: 0;
}

.pd-custom-profile-card .slider-widgets-container {
    width: 100%;
    margin: 0;
    min-height: 0;
}

.pd-custom-profile-card .reset-averages-btn-small {
    margin: 0;
}

.pd-custom-profile-card .ih-modal-metrics-table {
    margin: 0;
}

/* Results Container - Same background as controls */
.pd-custom-results-container {
    background: rgba(25, 35, 50, 0.7);
    border: 1px solid rgba(123, 214, 255, 0.15);
    border-radius: 16px;
    padding: 24px;
    width: fit-content;
    max-width: 1200px;
    margin: 24px auto 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pd-custom-results-container .pd-ih-chart-section {
    width: fit-content;
    max-width: 1200px;
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pd-custom-profile-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
    gap: 8px;
}

.pd-custom-profile-card__title {
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: 0.5px;
    margin-bottom: 0;
}

.pd-custom-profile-card__actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.pd-custom-pitch-select {
    background: rgba(10, 18, 30, 0.85);
    border: 1px solid rgba(123, 214, 255, 0.25);
    border-radius: 10px;
    padding: 8px 12px;
    color: #ffffff;
    font-size: 0.95rem;
    outline: none;
}

.pd-custom-pitch-select:focus {
    border-color: rgba(255, 106, 86, 0.45);
    box-shadow: 0 0 0 2px rgba(255, 106, 86, 0.15);
}

.pd-custom-summary {
    margin-top: 24px;
    width: 100%;
    display: flex;
    justify-content: center;
}

.pd-custom-summary-card {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    background: rgba(15, 25, 40, 0.85);
    border: 1px solid rgba(123, 214, 255, 0.25);
    border-radius: 14px;
    padding: 16px;
}

.pd-custom-summary-card .summary-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pd-custom-summary-card .summary-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: #9fbfe3;
    letter-spacing: 0.6px;
}

.pd-custom-summary-card .summary-value {
    font-size: 1.2rem;
    font-weight: 600;
    color: #ffffff;
}

.slider-input-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 12px 0 6px 0;
}

.slider-number-input {
    width: 90px;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid rgba(123, 214, 255, 0.3);
    background: rgba(5, 12, 20, 0.9);
    color: #ffffff;
    font-size: 0.9rem;
    outline: none;
}

.slider-number-input:focus {
    border-color: rgba(255, 106, 86, 0.45);
}

.slider-close-btn {
    background: linear-gradient(135deg, #ff6a56, #ff945a);
    border: none;
    border-radius: 20px;
    color: #ffffff;
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.slider-close-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(255, 106, 86, 0.35);
}

@media (max-width: 768px) {
    .pd-custom-controls {
        flex-direction: column;
        align-items: center;
        gap: 16px;
        padding: 16px;
        width: calc(100% - 32px);
        max-width: none;
        margin: 0 16px;
    }

    .pd-custom-secondary-controls {
        flex-direction: column;
        gap: 16px;
        align-items: center;
    }

    .pd-custom-control {
        min-width: auto;
        width: 100%;
        max-width: 250px;
    }

    .pd-custom-profiles {
        flex-direction: column;
        align-items: center;
        max-width: 100%;
    }

    .pd-custom-profile-card {
        width: 100%;
        max-width: 500px;
        min-width: 280px;
        padding: 6px 10px;
    }

    .pd-custom-profile-card__header {
        flex-direction: column;
        align-items: flex-start;
    }

    .pd-custom-summary-card {
        grid-template-columns: 1fr 1fr;
    }

    .pd-custom-results-container {
        padding: 16px;
        margin: 16px;
        width: calc(100% - 32px);
        max-width: none;
    }

    .pd-custom-results-container .pd-ih-chart-section {
        width: 100%;
        max-width: none;
    }

    /* Custom Dashboard Mobile CP Grid */
    .pd-custom-dashboard .pd-ih-cp-grid {
        grid-template-columns: 1fr;
        max-width: 100%;
    }
    
    .pd-custom-dashboard .pd-ih-cp-card {
        min-width: 320px;
        max-width: 100%;
        margin: 0 auto;
    }
    
    .pd-custom-dashboard .pd-ih-cp-grid .pd-ih-cp-card:nth-child(7) {
        max-width: 100%;
        min-width: 320px;
        margin: 0 auto;
        justify-self: center;
        grid-column: 1 / -1;
    }
}

#pd-custom-movement-chart {
    background: radial-gradient(circle at top, rgba(255,255,255,0.08), rgba(10,15,25,0.85));
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.08);
    width: 100%;
    max-width: 650px;
    height: 650px;
    margin: 0 auto;
    display: block;
}
