/* ==========================================================================
   1. Clean Up Contact Form (/index.php/modify-registration-request)
   ========================================================================== */

/* Hide the 'Fields' group legend header above custom fields */
.com-contact form fieldset legend,
.com-contact .contact-form legend,
.com-contact fieldset.fields-container legend {
    display: none !important;
}

/* Hide any administrative contact address or card metadata */
.com-contact .contact-address,
.com-contact .contact-contactinfo,
.com-contact .contact-details,
.com-contact .dl-horizontal,
.com-contact ul.contact-info,
.com-contact .contact-fields,
.com-contact .contact-extra-info {
    display: none !important;
}

/* Hide Emergency Contact & Personal Information sections below the contact form */
.com-contact .eb-custom-fields-data,
.com-contact .profile,
.com-contact fieldset:not(.contact-form):not(#contact-form fieldset),
.com-contact form ~ h2,
.com-contact form ~ h3,
.com-contact form ~ h4,
.com-contact form ~ div h3,
.com-contact form ~ div h4,
.com-contact form#contact-form + div,
.com-contact form#contact-form ~ div,
.com-contact form#contact-form ~ fieldset {
    display: none !important;
}


/* ==========================================================================
   2. Registration History Table (/index.php/your-events)
   ========================================================================== */

/* Style the first column (First Name) link as a prominent Edit button */
table.table td:first-child a,
table[class*="table"] tbody tr td:first-child a,
.com-eventbooking table td:first-child a {
    display: inline-flex !important;
    align-items: center !important;
    background-color: #0d6efd !important;
    color: #ffffff !important;
    padding: 5px 12px !important;
    border-radius: 4px !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15) !important;
    transition: background-color 0.15s ease-in-out !important;
}

table.table td:first-child a:hover,
table[class*="table"] tbody tr td:first-child a:hover,
.com-eventbooking table td:first-child a:hover {
    background-color: #0b5ed7 !important;
    color: #ffffff !important;
    text-decoration: none !important;
}

/* Add an explicit "(Edit)" label inside the button next to the name */
table.table td:first-child a::after,
table[class*="table"] tbody tr td:first-child a::after,
.com-eventbooking table td:first-child a::after {
    content: " (Edit)" !important;
    font-size: 0.8rem !important;
    font-weight: 400 !important;
    margin-left: 4px !important;
}

/* Hide redundant user profile and emergency data blocks below the history table */
.eb-registration-history .eb-custom-fields-data,
.table-eventbooking-history + div,
.table-eventbooking-history ~ fieldset {
    display: none !important;
}
/* ==========================================================================
   Wipe Out Trailing Profile & Emergency Sections on Contact Pages
   ========================================================================== */

/* 1. Target any container holding 'Emergency' or 'Personal Information' headings */
.com-contact div:has(> h2),
.com-contact div:has(> h3),
.com-contact div:has(> h4),
.com-contact section:has(> h2),
.com-contact section:has(> h3),
.com-contact section:has(> h4) {
    /* If the container contains those section headings, hide the whole container */
}

/* 2. Direct heading and sibling wipeout */
.com-contact h2,
.com-contact h3,
.com-contact h4,
.com-contact .tab-content,
.com-contact .accordion,
.com-contact .profile,
.com-contact .eb-custom-fields-data {
    display: none !important;
}

/* 3. Re-enable the contact form's own legend and heading so the form itself stays visible */
.com-contact .contact-form h2,
.com-contact .contact-form h3,
.com-contact .contact-form h4,
.com-contact .page-header h1,
.com-contact .page-header h2 {
    display: block !important;
}

/* 4. Cut off any trailing layout blocks rendered after the submit button */
.com-contact form .control-group:last-of-type ~ *,
.com-contact .contact-form ~ * {
    display: none !important;
}
/* ==========================================================================
   Fluid Responsive Header Navigation
   ========================================================================== */

/* Navbar container: wraps gracefully without overflowing */
.container-header .mod-menu,
.container-header .metismenu,
header .container-nav {
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: clamp(4px, 0.8vw, 10px) !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    max-width: 100% !important;
}

/* Individual links: auto-scale padding and font size based on screen width */
.container-header .mod-menu > li > a,
.container-header .metismenu > li > a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
    text-transform: uppercase !important;
    font-weight: 700 !important;
    letter-spacing: 0.3px !important;
    text-decoration: none !important;
    border-radius: 20px !important;
    
    /* Dynamically scales font between 12px (0.75rem) and 15px (0.95rem) */
    font-size: clamp(0.75rem, 0.9vw, 0.95rem) !important;
    
    /* Dynamically scales padding so buttons shrink on smaller desktop viewports */
    padding: 6px clamp(8px, 1vw, 16px) !important;
    
    background-color: #f3f4f6 !important;
    border: 1px solid #e5e7eb !important;
    color: #1f2937 !important;
    transition: all 0.2s ease-in-out !important;
}

/* Hover effect */
.container-header .mod-menu > li > a:hover,
.container-header .metismenu > li > a:hover {
    color: #0d6efd !important;
    background-color: #eef2ff !important;
    border-color: #bfdbfe !important;
}

/* Active page pill */
.container-header .mod-menu > li.active > a,
.container-header .mod-menu > li.current > a,
.container-header .metismenu > li.active > a,
.container-header .metismenu > li.current > a {
    color: #ffffff !important;
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
}

/* Intermediate screen safeguard (1024px to 1280px laptops/tablets) */
@media (max-width: 1200px) and (min-width: 992px) {
    .container-header .mod-menu > li > a,
    .container-header .metismenu > li > a {
        padding: 5px 10px !important;
        font-size: 0.8rem !important;
    }
}
/* ==========================================================================
   User Menu in Header: Desktop vs Mobile
   ========================================================================== */

/* Desktop view (screens wider than 991px) */
@media (min-width: 992px) {
    /* Style the User Menu as an accent button group beside main nav */
    .user-dashboard-menu {
        margin-left: 15px !important;
        background: #f0f7ff !important;
        border: 1px solid #bfdbfe !important;
        border-radius: 8px !important;
        padding: 4px 10px !important;
    }
    
    .user-dashboard-menu h3 {
        display: none !important; /* Hide title on wide screens to save space */
    }

    .user-dashboard-menu ul.mod-menu,
    .user-dashboard-menu ul.metismenu {
        display: flex !important;
        flex-direction: row !important;
        gap: 6px !important;
        list-style: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .user-dashboard-menu ul li a {
        font-size: 0.85rem !important;
        font-weight: 600 !important;
        color: #0d6efd !important;
        text-decoration: none !important;
        padding: 4px 8px !important;
    }
}

/* Mobile drawer view (screens up to 991px) */
@media (max-width: 991.98px) {
    .user-dashboard-menu {
        margin-top: 1.5rem !important;
        padding-top: 1rem !important;
        border-top: 2px dashed #dee2e6 !important;
    }
    
    .user-dashboard-menu h3 {
        display: block !important;
        font-size: 0.85rem !important;
        text-transform: uppercase !important;
        letter-spacing: 1px !important;
        color: #6c757d !important;
        margin-bottom: 0.5rem !important;
    }
}
/* Color the menu item icons gold */
header .navbar-nav a span[class*="fa"],
header .navbar-nav a span[class*="icon"],
header .navbar-nav a .fa,
header .navbar-nav a .fas,
header .navbar-nav a .fa-solid,
.mod-menu a span[aria-hidden="true"] {
  color: #f5b300 !important;   /* Athletic Gold */
  margin-right: 6px !important;
  display: inline-block !important;
}

/* Hover state: slightly brighter gold */
header .navbar-nav a:hover span[class*="fa"],
header .navbar-nav a:hover span[class*="icon"],
header .navbar-nav a:hover .fa,
header .navbar-nav a:hover .fas,
header .navbar-nav a:hover .fa-solid,
.mod-menu a:hover span[aria-hidden="true"] {
  color: #ffc72c !important;
}