/*
 * BSB Plugin Public Styles
 * Helper classes to complement Tailwind CSS
 */

/* 1. Import the 'Inter' font from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap');

/* 2. Main Gradient Text Effect */
.p2m-dashboard-wrapper .main-gradient-text {
    background: linear-gradient(90deg, #f30dff, #00e4ec);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* 3. Card Hover Transition (if not already in your main theme css) */
.p2m-dashboard-wrapper .card-hover-effect {
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}
.p2m-dashboard-wrapper .card-hover-effect:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* 4. The Glow Border Effect */
.p2m-dashboard-wrapper .glow-border {
    position: relative;
    z-index: 1;
}
.p2m-dashboard-wrapper .glow-border::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 0.75rem; /* Corresponds to rounded-lg in Tailwind */
    padding: 1px;
    background: linear-gradient(120deg, #f30dff, #00e4ec);
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: destination-out;
    mask-composite: exclude;
    z-index: -1;
    opacity: 0.5;
    transition: opacity 0.3s ease-in-out;
}
.p2m-dashboard-wrapper .glow-border:hover::before {
    opacity: 1;
}

/* 5. Custom styles for date picker icon on dark backgrounds */
.p2m-dashboard-wrapper input[type="date"]::-webkit-calendar-picker-indicator {
     filter: invert(0.8);
}

/* 6. Player Card List (non-tailwind fallback styles) */
.bsb-player-list-wrapper {
    font-family: 'Inter', sans-serif;
}
.bsb-player-card {
    border: 1px solid #444;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 0.75rem;
    background: #1e1e1e;
    color: #e0e0e0;
}
.bsb-player-card h3 {
    margin-top: 0;
    color: #fff;
}
.bsb-player-card .bsb-player-meta strong {
    color: #fff;
}
/*
 * 8. Contact Player Modal Styles
 */
.bsb-contact-modal {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
.bsb-contact-modal.is-active {
    display: flex; /* Shown when active */
}
.bsb-modal-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 10, 10, 0.86);
}
.bsb-modal-content {
    position: relative;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}
.bsb-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    cursor: pointer;
    width: 24px;
    height: 24px;
}
.bsb-modal-close:before, .bsb-modal-close:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80%;
    height: 2px;
    background-color: #777;
}
.bsb-modal-close:before {
    transform: translate(-50%, -50%) rotate(45deg);
}
.bsb-modal-close:after {
    transform: translate(-50%, -50%) rotate(-45deg);
}
/*
 * Leaflet Map Fixes
 */

/* Prevents theme conflicts that break map tiles */
.leaflet-container img {
    max-width: none !important;
    background-color: transparent !important;
}
/*
 * 9. Map Styles
 */

/* Sets the height of the map container */
.bsb-map-container {
    height: 600px;
    width: 100%;
    border-radius: 0.75rem;
    border: 1px solid #444;
    background-color: #1e1e1e; /* Dark background while map loads */
}

/* Styles for content inside the map popups */
.bsb-map-popup h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #333;
}

.bsb-map-popup p {
    margin: 0 0 5px 0;
    font-size: 14px;
    color: #555;
}

.bsb-map-popup .bsb-contact-button {
    width: 100%;
    margin-top: 10px;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: bold;
    color: #fff;
    background-color: #0ea5e9; /* Tailwind sky-500 */
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-align: center;
}
.bsb-map-popup .bsb-contact-button:hover {
    background-color: #0284c7; /* Tailwind sky-600 */
}
/*
 * 10. Comprehensive Fallback Form Styles (Corrected Syntax)
 * Provides a decent layout and design for forms if theme styles are missing.
 */

/* Header: Lays out the icon and title side-by-side */
.p2m-dashboard-wrapper .flex.items-center {
    display: flex;
    align-items: center;
}
.p2m-dashboard-wrapper .mb-6 {
    margin-bottom: 1.5rem;
}

/* Icon Container: The blue-ish rounded box for the icon */
.p2m-dashboard-wrapper .flex-shrink-0.h-10.w-10 {
    flex-shrink: 0;
    height: 2.5rem;
    width: 2.5rem;
    border-radius: 0.5rem;
    background-color: rgba(14, 165, 233, 0.1); /* Tailwind's bg-sky-500/10 */
    border: 1px solid rgba(14, 165, 233, 0.2);  /* Tailwind's border-sky-500/20 */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Icon SVG: This rule properly sizes the icon */
.p2m-dashboard-wrapper .h-5.w-5 {
    height: 1.25rem;
    width: 1.25rem;
}
.p2m-dashboard-wrapper .text-sky-400 {
    color: #38bdf8; /* Tailwind's text-sky-400 */
}
.p2m-dashboard-wrapper svg path {
    stroke: currentColor; /* This makes the SVG use the color set above */
}

/* Title: Adds space between the icon and the title text */
.p2m-dashboard-wrapper .ml-4 {
    margin-left: 1rem;
}

/* Form Layout */
.p2m-dashboard-wrapper .space-y-4 > * + * {
    margin-top: 1rem;
}
.p2m-dashboard-wrapper .grid {
    display: grid;
}
.p2m-dashboard-wrapper .gap-4 {
    gap: 1rem;
}
@media (min-width: 640px) {
    /* CORRECTED a syntax error here from \\: to \: */
    .p2m-dashboard-wrapper .sm\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Form Field Styling */
/* CORRECTED a syntax error here from \\/ to \/ */
.p2m-dashboard-wrapper form .bg-pink-600\/50 {
    width: 100%;
    box-sizing: border-box;
    background-color: rgba(219, 39, 119, 0.5);
    border: 1px solid #4b5563;
    border-radius: 0.375rem;
    padding: 0.5rem 0.75rem;
    color: #fff;
}
/* This selector targets the checkbox labels for player positions */
/* CORRECTED a syntax error here from \\: to \: */
.p2m-dashboard-wrapper .grid.grid-cols-2.sm\:grid-cols-4 label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Submit Button Styling */
.p2m-dashboard-wrapper form button[type="submit"].bg-sky-600 {
    display: inline-block;
    padding: 0.625rem 1.5rem;
    margin-top: 0.5rem;
    font-weight: 700;
    color: white;
    background-color: #0284c7; /* Tailwind's bg-sky-600 */
    border: none;
    border-radius: 0.375rem; /* Tailwind's rounded-md */
    cursor: pointer;
    transition: background-color 0.2s;
}
.p2m-dashboard-wrapper form button[type="submit"].bg-sky-600:hover {
    background-color: #0369a1; /* Tailwind's hover:bg-sky-700 */
}
/*
 * 11. Fallback Modal Content Styles
 * Provides design for the popup contact modal if theme styles are missing.
 */

/* The main content "card" of the modal */
.bsb-modal-content .bg-gray-800 {
    background-color: #1f2937; /* Tailwind's bg-gray-800 */
    border: 1px solid #374151;  /* Tailwind's border-gray-700 */
    border-radius: 0.5rem;      /* Tailwind's rounded-lg */
    padding: 1.5rem;            /* Tailwind's p-6 */
}

/* Modal Typography */
.bsb-modal-content h3 {
    font-size: 1.25rem; /* text-xl */
    font-weight: 700;   /* font-bold */
    color: #fff;         /* text-white */
    margin-bottom: 0.25rem; /* mb-1 */
}

.bsb-modal-content p {
    font-size: 0.875rem; /* text-sm */
    color: #9ca3af;     /* text-gray-400 */
    margin-bottom: 1.5rem;  /* mb-6 */
}

/* Modal Form Inputs and Labels */
.bsb-modal-content form label {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #d1d5db;
}

.bsb-modal-content form .bg-gray-900\/50 {
    width: 100%;
    box-sizing: border-box;
    background-color: rgba(17, 24, 39, 0.5); /* bg-gray-900/50 */
    border: 1px solid #4b5563;              /* border-gray-600 */
    border-radius: 0.375rem;                /* rounded-md */
    padding: 0.5rem 0.75rem;
    color: #fff;
}

.bsb-modal-content form textarea.bg-gray-900\/50 {
    min-height: 80px; /* Equivalent to rows="4" */
}

.bsb-modal-content form .space-y-4 > * + * {
    margin-top: 1rem;
}

/* Modal Submit Button */
.bsb-modal-content form button[type="submit"] {
    display: inline-block;
    padding: 0.625rem 1.5rem;
    margin-top: 0.5rem;
    font-weight: 700;
    color: white;
    background-color: #0284c7; /* bg-sky-600 */
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.bsb-modal-content form button[type="submit"]:hover {
    background-color: #0369a1; /* hover:bg-sky-700 */
}
/*
 * 12. Fallback Profile Summary Styles
 * Provides design for the "Your Profile Summary" section.
 */

/* The main container for the summary box */
.p2m-dashboard-wrapper .bg-gray-800\/50.mb-8 {
    background-color: rgba(31, 41, 55, 0.5); /* bg-gray-800/50 */
    border: 1px solid #374151;              /* border-gray-700 */
    border-radius: 0.5rem;                  /* rounded-lg */
    padding: 1.5rem;                        /* p-6 */
    margin-bottom: 2rem;                    /* mb-8 */
}

/* Main Title: "Your Profile Summary" */
.p2m-dashboard-wrapper .bg-gray-800\/50.mb-8 h3 {
    font-size: 1.25rem; /* text-xl */
    font-weight: 700;   /* font-bold */
    color: #fff;         /* text-white */
    margin-bottom: 1rem;/* mb-4 */
}

/* Grid container for Contact and Key Info */
.p2m-dashboard-wrapper .bg-gray-800\/50.mb-8 .grid {
    display: grid;
    gap: 1.5rem; /* gap-6 */
    grid-template-columns: repeat(1, minmax(0, 1fr)); /* grid-cols-1 */
}

/* Subheadings: "Contact Info", "Key Info" */
.p2m-dashboard-wrapper .bg-gray-800\/50.mb-8 h4 {
    font-weight: 700;   /* font-bold */
    color: #e5e7eb;     /* text-gray-200 */
    margin-bottom: 0.5rem; /* mb-2 */
}

/* All paragraph text in the summary box */
.p2m-dashboard-wrapper .bg-gray-800\/50.mb-8 p {
    color: #9ca3af;     /* text-gray-400 */
    font-size: 0.875rem; /* text-sm */
    margin-top: 0;
    margin-bottom: 0;
}

.p2m-dashboard-wrapper .bg-gray-800\/50.mb-8 p + p {
    margin-top: 0.25rem; /* mt-1 */
}

/* "Age Group:", "Sport:", etc. labels */
.p2m-dashboard-wrapper .bg-gray-800\/50.mb-8 .font-semibold {
    font-weight: 600;
}

/* The actual data values next to the labels */
.p2m-dashboard-wrapper .bg-gray-800\/50.mb-8 .text-gray-200 {
    color: #e5e7eb;
}

/* Container for the "Update Profile" button */
.p2m-dashboard-wrapper .bg-gray-800\/50.mb-8 .mt-6 {
    margin-top: 1.5rem;
    text-align: right; /* text-right */
}

/* "Update Profile" button styling */
.p2m-dashboard-wrapper .bg-gray-800\/50.mb-8 a.bg-sky-600 {
    display: inline-block;
    padding: 0.5rem 1.25rem; /* py-2 px-5 */
    font-weight: 700;
    color: white;
    text-decoration: none;
    background-color: #0284c7; /* bg-sky-600 */
    border-radius: 0.375rem;
    transition: background-color 0.2s;
}

.p2m-dashboard-wrapper .bg-gray-800\/50.mb-8 a.bg-sky-600:hover {
    background-color: #0369a1; /* hover:bg-sky-700 */
}

/* Media query for medium screens and wider (Tailwind's 'md' breakpoint) */
@media (min-width: 768px) {
    .p2m-dashboard-wrapper .bg-gray-800\/50.mb-8 .md\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}