/* Common button styles for the project */

.form-check-input:indeterminate {
    background-color: transparent !important;
    border-color: rgba(0,0,0,.25) !important;
}

.form-check-input:checked {
    background-color: #003778;
    border-color: #003778;
}

.btn-primary-pill,.btn-dark,.btn-primary {
    background: #003778 !important;
    border-color: #003778 !important;
    color: #fff !important;
    border-radius: 50rem!important
}
.btn-primary-pill:hover,.btn-primary:hover,.btn-primary-pill:focus,.btn-dark:hover,.btn-dark:focus {
    color: #fff;
    text-decoration: none;
    background-color: #00549a !important;
    border-color: #00549a !important;
}

.btn-advanced-search,.btn-danger,.btn-secondary {
    border: 2px solid #003778 !important;
    color: #003778 !important;
    background: #fff !important;
    transition: background 0.2s, color 0.2s;
    border-radius: 50rem!important
}
.btn-advanced-search:hover,.btn-danger:hover, .btn-advanced-search:focus,.btn-secondary:hover,.btn-secondary:focus {
    color: #00549a !important;
    border-color: #00549a !important;
    background-color: #ccd7e4 !important;
}
.page-item.active .page-link {
    z-index: 3;
    color: #fff;
    background-color: #003778 !important;
    border-color: #003778 !important;
}
.dropdown-menu {
    max-height: 400px;
    overflow-y: auto;
    padding: 8px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.dropdown-item {
    padding: 8px 16px;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
}

.form-check {
    margin: 0;
    padding-left: 24px;
}

.form-check-input {
    margin-top: 0.25rem;
}

.form-select[data-bs-toggle="dropdown"] {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 2.25rem;
}

.dropdown-menu .form-check-label {
    cursor: pointer;
    user-select: none;
}

/* Select all option styling */
.dropdown-menu li:first-child {
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 4px;
}

.dropdown-menu li:first-child .form-check-label {
    font-weight: 500;
}

/* Prevent text selection */
.dropdown-item, .form-check-label {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Keep dropdown open on click */
.dropdown.show {
    z-index: 1000;
}

/* Style for indeterminate state */
.form-check-input:indeterminate {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

/* Download Modal Styles */
.modal-title {
    font-size: 1.25rem;
    font-weight: 500;
}

.modal-body h6 {
    font-size: 1rem;
    font-weight: 500;
    color: #333;
}

.form-check-input[type="radio"] {
    width: 1.2em;
    height: 1.2em;
    margin-top: 0.2em;
}

.form-check-label {
    font-size: 1rem;
    padding-left: 0.5rem;
    cursor: pointer;
}

.btn-success {
    padding: 0.5rem 1rem;
    font-size: 1rem;
    border-radius: 4px;
}

.color-red {
    color: red; /* Ensure red color is defined if not globally available */
}

.truncate-text {
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Limit to 2 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    /* Optional: Set a max-height for browsers that don't support line-clamp */
    /* max-height: 3.6em; */ /* Adjust based on line-height */
    /* line-height: 1.8em; */ /* Example line-height */
}

/* Featured Ribbon */
.ribbon {
  font-size: 18px;
  font-weight: bold;
  color: #fff;
  --r: .4em;
  --c: #003778;
  position: absolute;
  bottom: 10px;
  right: -7px;
  line-height: 1.8;
  padding: calc(2*var(--r)) .5em 0;
  border-radius: 0 var(--r) var(--r) 0;
  background:
    radial-gradient(100% 50% at right,var(--c) 98%,#0000 101%)
     0 100%/.5lh calc(100% - 2*var(--r)),
    radial-gradient(100% 50% at left,#0005 98%,#0000 101%)
     100% 0/var(--r) calc(2*var(--r)),
    conic-gradient(at calc(100% - var(--r)) calc(2*var(--r)),var(--c) 75%,#0000 0)
     100% 0/calc(101% - .5lh) 100%;
  background-repeat: no-repeat;
  z-index: 10;
}

.card {
  position: relative;
  overflow: visible;
}
.modal-content button{text-align: left;}
