/* Custom styles for Project Finder */

/* Table sorting headers */
.sortable {
    cursor: pointer;
}

.sortable > div {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* New high score badge */
.new-badge {
    background-color: #FFD700;
    color: #333;
    animation: pulse 2s infinite;
    cursor: help;
}

/* Animation for NEW badge */
@keyframes pulse {
  0% {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.7);
  }
  50% {
    opacity: 0.9;
    transform: scale(1.05);
    box-shadow: 0 0 10px 5px rgba(255, 215, 0, 0.3);
  }
  100% {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.7);
  }
}

/* Multi-select dropdown styling */
.multiselect-container {
    position: relative;
}

.multiselect-dropdown {
    display: none;
    position: absolute;
    background-color: white;
    min-width: 100%;
    max-height: 400px;
    overflow-y: auto;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1000;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-top: 2px;
}

.multiselect-dropdown.show {
    display: block;
}

.multiselect-search {
    padding: 8px;
    border-bottom: 1px solid #ddd;
    position: sticky;
    top: 0;
    background: white;
}

.multiselect-search input {
    width: 100%;
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.multiselect-options {
    max-height: 350px;
    overflow-y: auto;
}

.multiselect-option {
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.multiselect-option:hover {
    background-color: #f1f1f1;
}

.multiselect-option input[type="checkbox"] {
    margin-right: 8px;
}

.multiselect-selected {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    background: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.multiselect-selected:hover {
    background-color: #f8f8f8;
}

.multiselect-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

.multiselect-tag {
    background-color: #2196F3;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
}

.multiselect-tag button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    margin-left: 4px;
    padding: 0;
    font-size: 14px;
}

/* Tooltip styling */
.tooltip-wrapper {
    position: relative;
    display: inline-block;
}

.tooltip-wrapper .tooltip-text {
    visibility: hidden;
    width: auto;
    min-width: 160px;
    background-color: #555;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px 12px;
    position: absolute;
    z-index: 9999;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 12px;
    white-space: nowrap;
}

.tooltip-wrapper .tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #555 transparent transparent transparent;
}

.tooltip-wrapper:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

.tooltip-wrapper.tooltip-last .tooltip-text {
    left: auto;
    right: 0;
    transform: none;
}

/* Common utility classes */
.inline-block {
    display: inline-block;
}

.inline {
    display: inline;
}

.nowrap {
    white-space: nowrap;
}

.overflow-visible {
    overflow: visible;
}

.padding-top-30 {
    padding-top: 30px;
}

.margin-left-5 {
    margin-left: 5px;
}

.margin-right-5 {
    margin-right: 5px;
}

.margin-right-4 {
    margin-right: 4px;
}

.margin-right-8 {
    margin-right: 8px;
}

.padding-left-24 {
    padding-left: 24px;
}

.text-decoration-none {
    text-decoration: none;
}

/* Branch category styling */
.branch-category-header {
    padding: 8px 8px 4px 8px;
    background: #e3f2fd;
    font-weight: bold;
    color: #1976d2;
    border-bottom: 1px solid #bbdefb;
    cursor: pointer;
    user-select: none;
}

.branch-category-header:first-of-type {
    margin-top: 0;
}

.branch-category-header:not(:first-of-type) {
    margin-top: 8px;
}

.branch-subcategory-info {
    font-weight: normal;
    font-size: 0.9em;
    color: #666;
}