/* Custom AdminLTE color overrides */

/* Override the default danger/red color with our custom color */
:root {
    --danger: #f61919;
    --red: #f61919;
}

/* Override accent-danger color */
.accent-danger a {
    color: #f61919;
}

.accent-danger.btn-link {
    color: #f61919;
}

.accent-danger .page-item.active .page-link,
.accent-danger .page-item.active .page-link:hover {
    background-color: #f61919;
    border-color: #f61919;
}

.accent-danger .page-item .page-link {
    color: #f61919;
}

/* Auth page link colors */
.login-page a,
.register-page a,
.password-reset-page a,
.password-email-page a,
.password-confirm-page a,
.auth-page a {
    color: #f61919;
}

.login-page a:hover,
.register-page a:hover,
.password-reset-page a:hover,
.password-email-page a:hover,
.password-confirm-page a:hover,
.auth-page a:hover {
    color: #d61212;
}

/* Focus styles for form controls */
.form-control:focus {
    border-color: rgba(246, 25, 25, 0.25);
    box-shadow: none;
}

/* Fix focus styling for input group icons */
.input-group:focus-within .input-group-append .input-group-text,
.card-body .input-group .form-control:focus ~ .input-group-append .input-group-text,
.card-body .input-group .form-control:focus ~ .input-group-prepend .input-group-text {
    border-color: rgba(246, 25, 25, 0.25) !important;
    box-shadow: none;
}

/* Override AdminLTE's default blue focus color for all auth pages */
.card-body .input-group .form-control:focus ~ .input-group-append .input-group-text,
.card-body .input-group .form-control:focus ~ .input-group-prepend .input-group-text {
    border-color: rgba(246, 25, 25, 0.25) !important;
    box-shadow: none !important;
}

/* Fix focus outline color for all form elements */
.form-control:focus,
.custom-select:focus,
.custom-control-input:focus ~ .custom-control-label::before,
.btn:focus,
.btn.focus,
.btn-link:focus,
.page-link:focus {
    border-color: rgba(246, 25, 25, 0.25) !important;
    box-shadow: none !important;
    outline-color: rgba(246, 25, 25, 0.5) !important;
}

/* Password toggle icon styling */
.password-toggle {
    cursor: pointer;
    position: absolute;
    right: 2.5rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    color: #adb5bd;
}

.password-toggle:hover {
    color: #6c757d;
}

/* Override iCheck styles for checkboxes */
.icheck-primary > input:first-child:checked + label::before,
.icheck-primary > input:first-child:checked + input[type="hidden"] + label::before {
    background-color: #f61919;
    border-color: #f61919;
}

.icheck-primary > input:first-child:not(:checked):not(:disabled):hover + label::before,
.icheck-primary > input:first-child:not(:checked):not(:disabled):hover + input[type="hidden"] + label::before {
    border-color: #f61919;
}

/* Change icheck-primary to use our accent red */
.login-page .icheck-primary > input:first-child:checked + label::before,
.login-page .icheck-primary > input:first-child:checked + input[type="hidden"] + label::before {
    background-color: #f61919;
    border-color: #f61919;
}

.login-page .icheck-primary > input:first-child:focus + label::before,
.login-page .icheck-primary > input:first-child:focus + input[type="hidden"] + label::before {
    border-color: #f61919;
    box-shadow: none;
}

/* Override card-danger color */
.card-danger:not(.card-outline) > .card-header {
    background-color: #f61919;
}

.card-danger.card-outline {
    border-top: 3px solid #f61919;
}

/* Override btn-danger color */
.btn-danger {
    background-color: #f61919;
    border-color: #e61414;
}

.btn-danger:hover {
    background-color: #e61414;
    border-color: #d61212;
}

/* Override sidebar-dark-danger color */
.sidebar-dark-danger .nav-sidebar > .nav-item > .nav-link.active,
.sidebar-light-danger .nav-sidebar > .nav-item > .nav-link.active {
    background-color: #f61919;
}

/* Override bg-danger color */
.bg-danger {
    background-color: #f61919 !important;
}

/* Ensure form validation styles remain visible and distinct */
.invalid-feedback {
    color: #dc3545; /* Bootstrap's default danger color */
    display: block;
}

.form-control.is-invalid {
    border-color: #dc3545;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-control.is-invalid:focus {
    border-color: #dc3545;
    box-shadow: none;
}

.text-danger {
    color: #dc3545 !important;
}

/* Pagination styling fixes */
.pagination {
    margin-bottom: 0;
}

.pagination .page-link {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
    line-height: 1.25;
}

.pagination .page-item .page-link {
    color: #6c757d;
    border: 1px solid #dee2e6;
}

.pagination .page-item.active .page-link {
    background-color: #007bff;
    border-color: #007bff;
    color: #fff;
}

.pagination .page-item:hover .page-link {
    color: #0056b3;
    background-color: #e9ecef;
    border-color: #dee2e6;
}

.pagination .page-item.disabled .page-link {
    color: #6c757d;
    background-color: #fff;
    border-color: #dee2e6;
}

/* Payment panel text colors for better contrast on blue background */
.alert-info .payment-free-amount {
    color: #FFFFFF !important;
    font-weight: 700 !important;
}

.alert-info .payment-free-note {
    color: #E6F1FF !important;
    opacity: 1 !important;
}

/* Free return trips banner styling */
.alert-free-returns {
    margin-top: 8px;
}

/* List group padding adjustment */
.list-group {
    padding-right: 0 !important;
}
