/* Define primary color, text color, and secondary color */
:root {
    --primary-color: rgba(242, 243, 245, 255);  /* Background color */
    --text-color-primary: rgba(0, 145, 191, 255);  /* Text color */
    --secondary-color: rgb(232, 4, 124);  /* Hover background color */
    --font-family-primary: "klavika-web", sans-serif; /* Font family */
}

/* Background image with transparency */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://www.compass-tt.com/wp-content/uploads/2022/08/Compass_Net_Grey.png');
    background-size: cover; /* Ensure the image covers the entire page */
    background-repeat: no-repeat; /* Prevent the image from repeating */
    background-position: center center; /* Center the image */
    background-attachment: fixed; /* Ensure the background stays fixed while scrolling */
    opacity: 0.3; /* 70% transparency (100% - 70% = 30% opacity) */
    z-index: -1; /* Ensure the background stays behind other content */
}

/* Navbar styling with background image */
.navbar {
    background: linear-gradient(to right, var(--text-color-primary), var(--secondary-color)), 
                url('https://www.compass-tt.com/wp-content/uploads/2022/08/Compass_Net_Grey.png'); /* Gradient with background image */
    background-size: cover; /* Ensure the image covers the entire navbar */
    background-repeat: no-repeat; /* Prevent the image from repeating */
    background-position: center; /* Center the background image */
    font-family: var(--font-family-primary) !important;
    color: white;
}


/* Navbar styling with background image and gradient */
.navbar {
    background: linear-gradient(to right, var(--text-color-primary), var(--secondary-color)), 
                url('https://www.compass-tt.com/wp-content/uploads/2022/08/Compass_Net_Grey.png'); /* Gradient with background image */
    background-size: cover; /* Ensure the image covers the entire navbar */
    background-repeat: no-repeat; /* Prevent the image from repeating */
    background-position: center; /* Center the background image */
    font-family: var(--font-family-primary) !important;
    color: white;
    border-bottom: none; /* Remove default border if any */
    box-shadow: none; /* Remove default shadow if any */
}

.navbar .navbar-brand,
.navbar .nav-link {
    color: white !important;
}

.navbar .nav-link:last-child {
    margin-right: 0; /* Remove right margin for the last navbar item */
}

.navbar .nav-link:hover {
    color: white !important;  /* Change text color on hover */
    background-color: var(--secondary-color) !important;  /* Background color on hover */
    border-radius: 8px; /* Add curved border (rounded corners) when hovered */
    transition: background-color 0.9s ease, border-radius 0.9s ease; /* Smooth transition for hover effect */
}


/* Navbar Toggler styling for mobile view */
.navbar-toggler {
    border-color: rgba(255, 255, 255, 0.5) !important;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='rgba(255,255,255,0.5)' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E") !important;
}



/* Base sidebar style */
.sidebar {
    background-color: #f8f9fa;
}

/* Optional: Adjust the appearance of the login collapse */
#loginCollapse {
    margin-top: 15px;
}

/* Optional: Styling for arrows */
#loginArrow {
    font-size: 1.2em;
}

.btn-secondary {
    text-align: left; /* Align text to the left within the button */
}

.sidebar h5 {
    margin-bottom: 0;
}

/* Footer styling */
.footer {
    background: linear-gradient(to right, var(--text-color-primary), var(--secondary-color)); /* Gradient background using main colors */
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://www.compass-tt.com/wp-content/uploads/2022/08/Compass_Net_Grey.png'); /* Use the background image for texture */
    background-size: cover;
    background-position: center;
    opacity: 0.1; /* Light overlay for subtle effect */
    z-index: 1;
}

.footer .container {
    position: relative;
    z-index: 2; /* Ensures content is above the overlay */
}

.footer h6 {
    font-weight: bold;
    color: white;
}

.footer p, .footer a {
    color: rgba(255, 255, 255, 0.8);
}

.footer a:hover {
    color: white; /* Hover effect for links */
    text-decoration: underline;
}

/* Responsive design adjustments for footer */
@media (max-width: 768px) {
    .footer {
        text-align: center;
    }

    .footer .col-md-4 {
        margin-bottom: 20px; /* Space between columns on small screens */
    }
}

/* Responsive behavior for screens 768px or smaller */
@media (max-width: 1024px) {
    /* Adjust the row to allow the sidebar to be placed above the main content */

    .sidebar {
        width: 100%;
        order: 1; /* Ensure the sidebar appears first */
        border-top: 1px solid #dee2e6;
        border-right: none;
    }

    .main-content {
        order: 2; /* Ensure the main content appears after the sidebar */
    }

    .col-md-10{
        width:100%;
    }

    /* Center the sidebar content */
    .sidebar h5,
    .sidebar form {
        text-align: center;
        width: 100%;
    }

    .sidebar form {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
}



@media (max-width: 768px) {
    .form-inline {
        flex-direction: column;
        align-items: flex-start;
    }

    .form-check-inline {
        display: block;
        margin-bottom: 10px;
    }

    .form-check-label {
        margin-left: 5px;
    }
}

@media (min-width: 769px) {
    .form-check-inline {
        display: flex;
        margin-right: 15px;
    }
}



@media (max-width: 576px) {
    h5.text-primary {
        font-size: 1.2rem;
        text-align: center;
    }
}

/* General styling for the main titles and subtitles */
.welcome-title, .section-title, .section-subtitle, .subtitle, .card-text {
    font-family: var(--font-family-primary);
}

.welcome-title {
    font-size: 3rem;
    font-weight: bold;
    color: var(--text-color-primary);
}

.text-primary {
    color: var(--text-color-primary) !important;
    font-size: 2rem;
}

/* Specific styling for section titles */
.section-title {
    font-weight: bold;
}

/* Specific styling for section subtitles */
.section-subtitle {
    font-weight: bold;
    color: var(--text-color-primary);
}

/* Styling for the word "We" */
.we-text {
    color: var(--secondary-color);
    font-weight: bold;
}

/* Styling for the card text */
.card-text {
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-color-primary);
}

/* Ensure strong tags are bold within the card text */
.card-text strong {
    font-weight: bold;
}

/* Initial state of the cards before they come into view */
.hover-card {
    opacity: 0;
    transform: translateY(20px); /* Start slightly below */
    transition: transform 0.5s ease, opacity 0.5s ease; /* Slightly longer transition for a smooth effect */
}

/* When the card comes into view, apply the 'visible' class */
.hover-card.visible {
    background-color: var(--primary-color);
    opacity: 1;
    transform: translateY(0); /* Move to its original position */
}

.hover-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.hover-card .card-title {
    color: var(--text-color-primary);
    transition: color 0.3s ease;
}

.hover-card:hover .card-title {
    color: var(--secondary-color);
}

/* General styling for statistic items */
.stat-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0; /* Light border between items */
}

.stat-title {
    font-weight: bold;
    color: #343a40; /* Darker color for the title */
    font-size: 1.3rem;
}

.stat-value {
    font-size: 1.3rem; /* Larger font for emphasis */
    font-weight: bold;
    color: #007bff; /* Bootstrap's primary color */
}

.rally-data-text-primary {
    color: #007bff; /* Adjust as needed */
    font-weight: bold;
}

.rally-data-text-danger {
    color: #dc3545; /* Adjust as needed */
    font-weight: bold;
}

.rally-data-text-secondary {
    color: #007bff; /* Adjust as needed */
    font-weight: bold;
}

.table-primary th {
    background-color: #e3f2fd;
}

.table-danger th {
    background-color: #f8d7da;
}


/* Mobile view adjustments */
@media (max-width: 576px) {
    .stat-item {
        flex-direction: row;
        justify-content: space-between;
        text-align: right;
    }

    .stat-title {
        text-align: left;
        font-size: 0.9rem; /* Slightly smaller on mobile */
    }

    .stat-value {
        font-size: 1.2rem; /* Adjust size for mobile */
    }
}

.section-title {
    font-size: 1.5rem;
    color: #23272b;
    font-weight: bold;
    margin-bottom: 20px;
    text-transform: uppercase;
}

/* Custom styles for table headings */
.table thead th {
    background-color: var(--text-color-primary);
    color: white;
    font-weight: bold;
    text-align: center;
}

/* Custom styles for table rows */
.table tbody tr {
    transition: background-color 0.2s ease;
}

.table tbody tr:hover {
    background-color: var(--secondary-color);
    color: white;
}

/* Checkbox styling */
.form-check-label {
    color: var(--text-color-primary);
    font-weight: bold;
}

.form-check-input:checked {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.form-check-input:focus {
    border-color: var(--text-color-primary);
    box-shadow: 0 0 0 0.1rem rgba(0, 145, 191, 0.25);
}

/* General table styling */
.table-responsive {
    height: 100%;
    overflow-y: auto;
    overflow-x: auto; /* Enable horizontal scrolling */
}


/* Media query for smaller screens */
@media (max-width: 768px) {
    .table-responsive {
        overflow-x: auto; /* Ensure horizontal scrolling */
    }

    .table {
        font-size: 10px; /* Increase font size for readability */
        min-width: 600px; /* Ensure the table has a minimum width for scrolling */
    }

    .table td, .table th {
        padding: 12px; /* Increase padding for better touch interaction */
        white-space: nowrap; /* Prevent text wrapping in cells */
    }

    .table thead th {
        font-size: 12px; /* Slightly larger header font size */
    }

    .table tbody td {
        font-size: 11px; /* Slightly larger font size for content */
    }
}


.filter-scrollable {
    max-height: 150px;
    overflow-y: auto;
    border: 1px solid #ddd;
    padding: 5px;
    background: #f8f9fa;
    border-radius: 5px;
}

/* Profile container to add padding and center the card */
.profile-container {
    padding: 20px;
    max-width: 900px;
    margin: 0 auto;
}

/* Profile image container with some padding */
.profile-image-container {
    padding: 20px;
    background-color: #f8f9fa; /* Light gray background */
    border-radius: 0 0.375rem 0.375rem 0; /* Rounded corners on the right side */
    display: flex;
    justify-content: center;
    align-items: center;
}

.athlete-custom-img, .academy-custom-img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 15px;
    position: relative;
    overflow: hidden;

    /* Remove background and blur */
    background: transparent;
    backdrop-filter: none;

    /* Optional: Keep border animation if you like it */
    border: 2px solid transparent;
    animation: glowing-border 3s infinite linear;
}



/* Ensures proper video preview layout */
.video-preview {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
}

/* Play button */
.play-btn {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-btn:hover {
    background: rgba(0, 0, 0, 0.9);
}

/* Video Element */
.video-element {
    width: 100%;
    height: 100%;
    display: none; /* Initially hidden */
    object-fit: contain; /* Keeps full video visible */
    border-radius: 8px;
}










.athlete-card {
    background: linear-gradient(135deg, rgba(0, 145, 191, 1), rgb(232, 4, 124));
    color: white; /* Adjust text color for visibility */
    padding: 0px;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.3);
}

.athlete-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px);
    background-size: 12px 12px; /* slightly larger spacing */
    opacity: 0.3;
    z-index: 0; /* just behind content, above .athlete-name-bg if needed */
}



.athlete-name-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%; /* Full width */
    text-align: center; /* Center the text horizontally */
    font-size: 10vw;
    font-weight: 800;
    background: linear-gradient(90deg, rgba(255,255,255,0.1), rgba(255,255,255,0.02));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    white-space: nowrap;
    pointer-events: none;
    z-index: 0;
}
@media (max-width: 768px) {
    .athlete-name-bg {
        display: none;
    }
}

/* Keep your original desktop styles */
.dropdown-menu li {
  position: relative;
}

.dropdown-menu .dropdown-submenu {
  display: none;
  position: absolute;
  left: 100%;
  top: -7px;
}

.dropdown-menu .dropdown-submenu-left {
  right: 100%;
  left: auto;
}

.dropdown-menu > li:hover > .dropdown-submenu {
  display: block;
}

/* ✅ Add mobile-friendly overrides */
@media (max-width: 768px) {
.dropdown-menu .dropdown-submenu {
  position: relative;
  top: 0;
  left: 0;
  display: none;
  margin-left: 0;
  width: 100%;
  text-align: center;
  background-color: #f8f9fa;        /* Light gray background */
  box-shadow: none;
  border-top: 1px solid #dee2e6;    /* Optional subtle top separator */
  border-left: 10px solid #e0e0e0;   /* NEW: subtle left border */
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}


  .dropdown-menu .dropdown-submenu.show {
    display: block;
  }

  .dropdown-item {
    text-align: center;
  }

  .dropdown-item.toggle-submenu::after {
    content: "▼";
    float: right;
    font-size: 0.7rem;
    transform: rotate(0deg);
    transition: transform 0.2s;
  }

  .dropdown-item.toggle-submenu.active::after {
    transform: rotate(180deg);
  }
}






.athlete-card > *:not(.athlete-name-bg) {
    position: relative;
    z-index: 1;
}







/* Card styling enhancements */
.card {
    border-radius: 0.375rem;
    overflow: hidden;
}

/* Card body enhancements */
.card-body {
    padding: 2rem;
}

/* Card title enhancement */
.card-title {
    font-size: 2rem;
    font-weight: 700;
}

/* Card text styling */
.card-text {
    margin-bottom: 0.5rem;

}

.athlete-profile-card-text {
    color: rgba(242, 243, 245, 0.9);
    font-weight: 500;
    letter-spacing: 0.5px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    margin-bottom: 6px; /* reduce vertical spacing */
    line-height: 1.3; /* tighter line spacing */
}


/* Profile page HR styling */
.card-body hr {
    margin: 1.5rem 0;
    border-top: 1px solid #dee2e6;
}

/* Container adjustments */
.container-fluid.mb-3 {
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

/* Slider track styling */
.noUi-connect {
    background: linear-gradient(90deg, #007bff, #6610f2);
}

/* Slider handle styling */
.noUi-handle {
    background-color: #fff;
    border: 2px solid #007bff;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.noUi-tooltip {
    background: #007bff;
    color: #fff;
    border-radius: 4px;
    font-size: 14px;
    padding: 5px;
}

#sliderValue {
    font-weight: bold;
    color: #333;
}

.selection-container {
    background-color: #f8f9fa; /* Light grey background */
    border: 2px solid rgba(0, 145, 191, 0.3); /* Light blue border */
    border-radius: 12px; /* Rounded corners */
    padding: 20px; /* Spacing inside the container */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15); /* Soft shadow effect */
    transition: box-shadow 0.3s ease, transform 0.3s ease; /* Smooth transition on hover */
    max-width: 600px; /* Limit the width for better appearance */
    margin: 0 auto; /* Center the container */
}

/* Hover effect for a cool interactive look */
.selection-container:hover {
    box-shadow: 0 15px 25px rgba(0, 0, 0, 0.25); /* Enhance the shadow on hover */
    transform: translateY(-5px); /* Slight lift effect on hover */
}

/* Adjust form elements to look consistent */
.selection-container .form-label {
    color: #007bff; /* Text color to match the theme */
    font-weight: bold;
}

.form-group {
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: center;
    justify-content: center;
}

/* Flash message container styling */
#flash-messages {
    position: fixed;
    top: 20px;  /* Keep it visible near the top */
    right: 20px;  /* Align to the right */
    z-index: 1000;  /* Ensure it appears above other elements */
    max-width: 300px;  /* Limit the width */
    border-radius: 5px;  /* Rounded corners */
}

/* Styling for individual flash messages */
#flash-messages .alert {
    padding: 15px 20px;
    font-size: 16px;
    font-weight: bold;
    color: #fff;
}

/* Specific colors for each message category */
#flash-messages .alert-success {
    background-color: #28a745;  /* Green for success */
    border-left: 5px solid #218838;
}

#flash-messages .alert-error {
    background-color: #dc3545;  /* Red for error */
    border-left: 5px solid #c82333;
}

#flash-messages .alert-warning {
    background-color: #ffc107;  /* Yellow for warning */
    border-left: 5px solid #e0a800;
}

#flash-messages .alert-info {
    background-color: #17a2b8;  /* Blue for info */
    border-left: 5px solid #117a8b;
}

#flash-messages .alert.flashes {
    opacity: 1;
    transition: opacity 0.5s ease-out;
}

#flash-messages .alert.flashes.hidden {
    opacity: 0 !important;
    pointer-events: none;
}






  



/* Responsive behavior for small screens */
@media (max-width: 576px) {
    .card-body {
        padding: 1.5rem;
    }

    .profile-container {
        padding: 10px;
    }
}

.chart-container {
    position: relative;
    justify-content: center;
    align-items: center;
    margin: 0 auto; /* Center the div horizontally */
    overflow-x: scroll; /* Enable horizontal scrolling */
    height: 300px; /* Set a fixed height for the chart */
    min-width: 800px; /* Set a minimum width to ensure proper layout */
    max-width: 100%; /* Allow full width within the container */
    white-space: nowrap; /* Prevent content wrapping */
}

.chart-container canvas {
    display: block;
    max-width: none; /* Override the default max-width for canvas */
    width: 100%; /* Make sure the canvas takes full width of its container */
}

/* Media query to adjust for smaller screens */
@media (max-width: 768px) {
    .chart-container {
        height: 250px; /* Adjust the height for smaller screens */
        min-width: 800px; /* Ensure the chart has enough width to be scrollable */
    }
}

/* Rally Data Statistics Page */

.rally-data-card {
    background: linear-gradient(135deg, rgba(0, 145, 191, 0.15), rgba(232, 4, 124, 0.15));
    color: var(--bs-body-color); /* Use Bootstrap's text color */
    position: relative;
    overflow: hidden;
    box-shadow: inset 0px 4px 10px rgba(0, 0, 0, 0.05); /* Subtle inset shadow */
}

/* Add a faint pattern for extra visual interest */
.rally-data-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(rgba(0, 0, 0, 0.05) 5%, transparent 15%);
    background-size: 12px 12px;
    opacity: 0.8;
    pointer-events: none;
}



/* Match Analyzer */


/* Styling for Rally Data Entry Section */
.rally-options {
    display: flex;
    gap: 10px;
    justify-content: space-around;
    margin-bottom: 20px;
    flex-wrap: wrap; /* Allows buttons to wrap in small screens */
}

/* Rally Button Style */
.rally-button {
    padding: 6px 10px;
    font-size: 0.8rem;
    background-color: var(--text-color-primary);
    color: white;
    border: 1px solid var(--text-color-primary); /* Add border */
    border-radius: 0; /* Keep corners squared */
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    margin: 2px; /* Add a bit of space between buttons */
}

.form-label {
    margin-bottom: 5px;
    font-size: 0.85rem;
}

/* Reduce button size for Add Rally Data */
.btn-success {
    padding: 8px 12px;
    font-size: 0.85rem;
}



.rally-button-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

#rallyNotification {
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 1000;
    display: none;
    transition: opacity 0.5s ease;
}

#rallyNotification.show {
    display: block;
    opacity: 1;
}

#rallyNotification.hide {
    opacity: 0;
}

#notification {
    position: fixed;       /* Keep the notification at a fixed position */
    top: 0;                /* Stick to the top of the screen */
    left: 0;               /* Align it to the left edge of the screen */
    width: 100%;           /* Make it span across the full width */
    z-index: 9999;         /* Ensure it's always on top of other elements */
    display: none;         /* Initially hidden */
    padding: 10px;
    box-sizing: border-box; /* Ensure padding doesn't affect the width */
}





/* Canvas Container */
#table-image-container {
    text-align: center;
    margin: 0;
}

/* Canvas Styling */
#ttTableCanvas {
    display: block;
    margin: 0 auto;
    border: 2px solid var(--text-color-primary);
    width: 60%;
    max-width: 100%; /* Set the image to 70% of its container's width */
    height: auto; /* Maintain aspect ratio */
}

#playerNamesContainer, #playerNamesReceptionContainer {
    width: 70%; /* Match the width of the canvas */
    margin: 0 auto; /* Center the div */
    font-size: 1.2rem; /* Increase font size */
  }
  
  #compassPlayerName, #opponentName, #opponentNameReception, #compassPlayerNameReception{
    flex: 1;
    text-align: left;
  }
  
  #opponentName {
    text-align: left;
  }


  .custom-card-title {
    font-size: 0.9rem; /* Adjusted smaller font size for title */
    font-weight: 600;
    color: var(--text-color-primary); /* Use your custom color */
}

.custom-card-value {
    font-size: 1rem; /* Adjusted size for total rallies value */
    font-weight: bold;
    color: var(--text-color-primary);
    margin: 0;
}

.custom-card-subtitle {
    font-size: 0.8rem; /* Smaller font for subtitles */
    font-weight: 600;
}

.custom-card-details {
    font-size: 0.75rem; /* Smaller font size for details (won/lost) */
}

.custom-card-percentage {
    font-size: 0.7rem; /* Small font size for percentages */
    color: #6c757d; /* Use muted gray color */
    margin: 0;
    padding: 0;
}

  


/* Responsive Table */
.table-responsive {
    max-width: 100%;
    margin-top: 20px;
    overflow-x: auto;
}

.table th, .table td {
    padding: 12px;
    text-align: center;
}

.table th {
    background-color: var(--text-color-primary);
    color: white;
    font-weight: bold;
}

.table tbody tr:hover {
    background-color: var(--secondary-color);
    color: white;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
    border: none;
}

.btn-danger:hover {
    background-color: #c82333;
}

/* Styling for selected radio buttons */
.btn-check:checked + .rally-button {
    background-color: var(--secondary-color);  /* Change background color of the selected button */
    color: white;  /* Change text color */
    border-color: var(--secondary-color);  /* Change border color if needed */
}
.btn-check+.btn:hover{
    background-color: rgb(0, 106, 255);
    color: white;
    border-color: var(--text-color-primary);
}

/* Optional: Add hover state styling for better interaction */
.rally-button:hover {
    background-color: var(--text-color-primary); /* Hover background color */
    border-color: var(--text-color-primary); /* Hover border color */
    transform: scale(1.03); /* Slightly enlarge button on hover */

}

/* If you want a different color for the active state */
.rally-button.active {
    background-color: var(--secondary-color);  /* Active button background color */
    color: white;  /* Active button text color */
    border-color: var(--secondary-color);  /* Active button border color */
}

/* Compact the form group margins */
.row.mb-2.p-1 {
    margin-bottom: 10px;
    padding: 0 !important;
}

.missing-report td {
    background-color: #f8d7da !important;
}


/* REPORT FORM SUBMISSION PARTS */


.form-label {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--text-color-primary);  /* Use your predefined text color */
    border-bottom: 2px solid var(--text-color-primary);
    padding-bottom: 5px;
    margin-bottom: 15px;
    display: inline-block;
}


.cke_notifications_area {
    display: none !important;
}

/* Hide the default radio buttons */
.rating-button input[type="radio"] {
    display: none;
}
/* Rating button style */
.rating-button {
    background-color: var(--primary-color);
    color: var(--text-color-primary);
    border-radius: 25px;
    padding: 10px 20px;
    margin: 5px;
    border: 2px solid var(--text-color-primary);
    font-family: var(--font-family-primary);
    font-size: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* On hover, change background and text color */
.rating-button:hover {
    background-color: var(--text-color-primary);
    color: white;
    border-color: var(--text-color-primary);
}

/* Active button style */
.rating-button.active {
    background-color: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Adjusting button spacing for aesthetics */
.rating-button-group {
    display: flex;
    justify-content: space-between;
}

.autocomplete-items {
    position: absolute;
    border: 1px solid #ddd;
    z-index: 99;
    max-height: 200px;
    overflow-y: auto;
    background: white;
}

.autocomplete-items div {
    padding: 10px;
    cursor: pointer;
}

.autocomplete-items div:hover {
    background: #f1f1f1;
}




@media (max-width: 768px) {
    .reportdiv .form-group.row {
        width: 100%; /* Full width on screens smaller than 768px */
    }
}





/* Responsive behavior */
@media (max-width: 1024px) {
    .rally-options {
        flex-direction: column;
        margin-bottom: 10px;
    }

    .rally-button {
        width: 100%;
        text-align: center;
    }


    .row.mb-3.p-2 {
        margin-bottom: 0; /* Reduce margin-bottom for rows */
        padding: 0px !important; /* Reduce padding */
    }

    .form-label {
        font-size: 1rem; /* Reduce font size of form labels */
    }

    .btn-group .rally-button {
        padding: 6px 10px; /* Reduce button padding */
        font-size: 0.9rem; /* Reduce button font size */
    }

    #ttTableCanvas {
        width: 100%; /* Ensure the canvas takes full width */
        max-width: 100%; /* Make sure the canvas scales */
        height: auto; /* Maintain aspect ratio */
    }

    .card-body h4 {
        font-size: 1.2rem; /* Reduce heading size */
    }

    /* Reduce button size for Add Rally Data */
    .btn-success {
        padding: 8px 12px;
        font-size: 1rem;
    }

    .form-group {
        flex-direction: column; /* Stack label and input vertically */
        align-items: flex-start; /* Align items to the left */
        gap: 5px;
    }

    .form-group .form-label, 
    .form-group select, 
    .form-group button {
        width: 100%; /* Make elements take full width */
    }
}

.form-rating-button {
    margin-bottom: 0;
    font-size: 1.4rem !important; /* Slightly larger font */
    padding: 6px 8px !important; /* Increased padding for better touch target */
    text-align: center;
    border-radius: 12px !important; /* Larger rounded corners */
    border: 2px solid #007bff !important; /* Blue border */
    background: linear-gradient(135deg, #42a5f5, #ce93d8) !important; /* Light gradient background */
    color: #f1f5f9 !important; /* Light text color */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15) !important; /* More prominent shadow */
    transition: all 0.3s ease !important; /* Smooth transition for hover and focus effects */
    cursor: pointer;
}

/* Hover effect */
.form-rating-button:hover {
    background: linear-gradient(135deg, #2563eb, #60a5fa) !important; /* Brighter gradient */
    border-color: #1d4ed8 !important; /* Darker border */
    color: #f8fafc !important; /* Lighter text color */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25) !important; /* Stronger shadow on hover */
    transform: translateY(-2px) !important; /* Subtle lift effect */
}

/* Active (checked) effect */
input:checked + .form-rating-button {
    background: linear-gradient(135deg, #007bff, #0056b3) !important;
    color: #ffffff !important;
    border-color: #0056b3 !important;
}

/* Focus effect */
.form-rating-button:focus {
    outline: none;
    box-shadow: 0 0 6px 3px rgba(59, 130, 246, 0.5) !important; /* Focus ring effect */
}

/* Responsive spacing */
.d-flex.flex-wrap.gap-1 {
    gap: 6px !important; /* Increase spacing between buttons */
    justify-content: center !important;
}


@media (max-width: 768px) {
    /* Adjusting the buttons to stay next to each other */
    #servingPlayerButtons, 
    #serviceTypeButtons, 
    #pointWinnerButtons {
        display: flex;
        flex-wrap: wrap; /* Allow buttons to wrap if necessary */
        justify-content: space-between; /* Ensure buttons fill available space */
        gap: 5px; /* Small gap between buttons */
        align-items: center; /* Vertically center the buttons */
    }
    #playerNamesContainer {
        width: 100%; /* Match the width of the canvas */
        margin: 0 auto; /* Center the div */
        font-size: 0.6rem !important; /* Increase font size */
    }



    .btn-check + .btn {
        flex: 1 1 calc(33% - 6px); /* Each button takes 50% of the width with some spacing */
        margin-bottom: 0; /* Remove bottom margin */
        font-size: 0.7rem; /* Slightly smaller font */
        padding: 3px 5px; /* Adjust padding to reduce button size */
        text-align: center; /* Center text in buttons */
        border-radius: 6px; /* Ensure rounded corners */
        box-sizing: border-box; /* Prevent overflow issues */
    }


    
    



    .rally-button {
        font-size: 0.75rem;
        padding: 4px 8px; /* Smaller padding */
        width: auto; /* Let buttons take up only necessary width */
    }




    /* Canvas size adjustment for mobile */
    #ttTableCanvas {
        width: 100%;
        max-width: 100%;  /* Ensure the canvas scales properly */
        height: auto;  /* Ensure aspect ratio is maintained */
    }

    .btn-success {
        padding: 8px 12px; /* Reduce padding for Add Rally Data */
        font-size: 0.9rem; /* Slightly smaller font */
    }


    /* Adjust table size and layout */
    .table-responsive {
        max-width: 100%;
        overflow-x: auto;
    }

    .table {
        font-size: 11px; /* Reduce table font size */
    }

    .table th, .table td {
        padding: 6px; /* Further reduce padding in table cells */
    }

    /* Reduce button size */
    .btn {
        padding: 0.25rem 0.4rem;
        font-size: 0.8rem;
    }

    /* Margin and padding adjustments */
    .card-body h4, .form-label {
        font-size: 1rem; /* Reduce label and heading size */
    }

    /* Reduce padding and margins between form elements */
    .form-group {
        margin-bottom: 8px;
    }
}


/* Rally data stuff */ 

/* Specific styles for rally data tables */
.rally_data_table {
    font-size: 12px; /* Smaller font size for compact layout */
    border-collapse: collapse; /* Remove spacing between table cells */
    width: 100%;
}

.rally_data_table th, 
.rally_data_table td {
    padding: 6px 8px; /* Reduce padding inside cells */
    text-align: center; /* Center-align content */
    vertical-align: middle; /* Align text vertically in the middle */
    white-space: nowrap; /* Prevent text wrapping */
}

.rally_data_table th {
    background-color: var(--text-color-primary); /* Consistent header color */
    color: white;
    font-weight: bold;
    border: 1px solid #dee2e6; /* Add border for better readability */
}

.rally_data_table td {
    border: 1px solid #dee2e6; /* Add border for all cells */
    color: #333; /* Neutral text color */
}

.rally_data_table tbody tr:hover {
    background-color: #f1f1f1; /* Light hover effect for rows */
}

.rally_data_table .nested_table {
    width: 100%; /* Ensure nested tables take full width */
    margin: 0;
    border: none; /* Remove borders for nested tables */
}

.rally_data_table .nested_table th, 
.rally_data_table .nested_table td {
    padding: 4px 6px; /* Further reduce padding for nested tables */
    font-size: 11px; /* Smaller font size for nested tables */
}

.rally_data_table .nested_table th {
    background-color: #e9ecef; /* Light gray for nested headers */
    color: #212529; /* Darker text for contrast */
}

.rally_data_table .nested_table td {
    color: #555; /* Lighter text for nested cells */
}

.sort-arrow {
    font-size: 12px;
    margin-left: 5px;
    display: inline-block;
    width: 12px;
    text-align: center;
}
.sort-arrow::after {
    content: ''; /* Default: No arrow */
}
.asc .sort-arrow::after {
    content: '▲'; /* Up arrow for ascending */
}
.desc .sort-arrow::after {
    content: '▼'; /* Down arrow for descending */
}

/* Responsive adjustments for RESULTS page*/
.small-checkbox {
    width: 14px;
    height: 14px;
    margin-right: 5px;
}

.small-text {
    font-size: 14px;
}

#matches-table {
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}

.loading #matches-table {
    opacity: 0.5; /* Table fades out slightly while loading */
}




/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
    .rally_data_table {
        font-size: 11px; /* Reduce font size for smaller screens */
    }

    .rally_data_table th, 
    .rally_data_table td {
        padding: 4px 6px; /* Adjust padding for smaller devices */
    }

    .rally_data_table .nested_table th, 
    .rally_data_table .nested_table td {
        font-size: 10px; /* Further reduce font size for nested tables */
        padding: 3px 5px; /* Reduce padding for compact layout */
    }
}





