/* Form styling consistency fix */
/* This ensures all form controls get the same nice bordered appearance */

/* Only target form controls, not navigation elements */
.card .form-control, 
.card .form-select, 
.card select.form-control,
.card select.form-select,
.card select,
form .form-control, 
form .form-select, 
form select.form-control,
form select.form-select,
form select {
    background-color: #fff !important;
    border: 1px solid #d2d6da !important;
    border-radius: 0.375rem !important;
    padding: 0.625rem 0.75rem !important;
    font-size: 0.875rem !important;
    line-height: 1.4 !important;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
}

.card .form-control:focus,
.card .form-select:focus,
.card select.form-control:focus,
.card select.form-select:focus,
.card select:focus,
form .form-control:focus,
form .form-select:focus,
form select.form-control:focus,
form select.form-select:focus,
form select:focus {
    border-color: #e91e63 !important;
    outline: 0 !important;
    box-shadow: 0 0 0 0.2rem rgba(233, 30, 99, 0.25) !important;
}

/* Ensure labels are properly styled - only in forms */
/* Exclude navigation from label styling to prevent menu header wrapping */
form label,
.card label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #344767;
}

/* Explicitly prevent navigation elements from inheriting form label styles */
.navbar label,
.navbar h6,
.dropdown-menu label,
.dropdown-menu h6 {
    display: inherit !important;
    margin-bottom: inherit !important;
    font-weight: inherit !important;
    color: inherit !important;
    line-height: inherit !important;
    white-space: nowrap !important;
}

/* Force navigation link text to stay on single lines */
.navbar .nav-link,
.navbar .nav-link * {
    white-space: nowrap !important;
    flex-wrap: nowrap !important;
}

/* Specifically target the flexbox navigation links */
.navbar .nav-link.d-flex {
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
}

/* Prevent text nodes within navigation links from wrapping */
.navbar .nav-link.font-weight-semibold {
    white-space: nowrap !important;
}

/* Add some margin to form controls that don't have form-group wrapper */
.card .form-control:not(.form-group .form-control),
.card .form-select:not(.form-group .form-select),
form .form-control:not(.form-group .form-control),
form .form-select:not(.form-group .form-select) {
    margin-bottom: 1rem;
}

/* Style for select dropdowns to match other form controls */
/* Hide default browser arrow first, then add custom one */
.card select,
form select {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e") !important;
    background-position: right 0.5rem center !important;
    background-repeat: no-repeat !important;
    background-size: 1.5em 1.5em !important;
    padding-right: 2.5rem !important;
}

/* Fix for team members page searchable dropdown */
.search-input {
    background-color: #fff !important;
    border: 1px solid #d2d6da !important;
    border-radius: 0.375rem !important;
    padding: 0.625rem 0.75rem !important;
    font-size: 0.875rem !important;
    line-height: 1.4 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    margin-bottom: 1rem !important;
}

.search-input:focus {
    border-color: #e91e63 !important;
    outline: 0 !important;
    box-shadow: 0 0 0 0.2rem rgba(233, 30, 99, 0.25) !important;
}

/* Button styling consistency */
button[type="submit"]:not(.btn),
input[type="submit"]:not(.btn) {
    background: linear-gradient(310deg, #e91e63, #ad1457) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 0.375rem !important;
    padding: 0.625rem 1.25rem !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.15s ease-in-out !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24) !important;
}

button[type="submit"]:not(.btn):hover,
input[type="submit"]:not(.btn):hover {
    background: linear-gradient(310deg, #ad1457, #880e4f) !important;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23) !important;
    transform: translateY(-1px) !important;
}

/* Special styling for race control form elements */
#racecontrol .form-select,
#racecontrol .form-control {
    background-color: #fff !important;
    border: 1px solid #d2d6da !important;
    border-radius: 0.375rem !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
}