/* Custom Select - shadcn/ui Style */
.custom-select {
    position: relative;
    width: 100%;
}

.select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 2.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
    border: 1px solid hsl(var(--input));
    border-radius: calc(var(--radius) - 2px);
    background-color: hsl(var(--background));
    cursor: pointer;
    transition: all 0.2s;
}

.select-trigger:hover {
    border-color: hsl(var(--ring));
}

.select-trigger:focus {
    outline: none;
    box-shadow: 0 0 0 2px hsl(var(--ring));
}

.select-value {
    flex: 1;
    text-align: left;
}

.select-value.text-muted-foreground {
    color: hsl(var(--muted-foreground));
}

.select-icon {
    width: 1rem;
    height: 1rem;
    opacity: 0.5;
    transition: transform 0.2s;
}

.select-trigger[aria-expanded="true"] .select-icon {
    transform: rotate(180deg);
}

.select-content {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 0.25rem;
    max-height: 10rem;
    overflow-y: auto !important;
    overflow-x: hidden;
    background-color: hsl(var(--popover));
    border: 1px solid hsl(var(--border));
    border-radius: calc(var(--radius) - 2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    z-index: 50;
    opacity: 0;
    transform: scale(0.95);
    pointer-events: none;
    transition: opacity 0.15s, transform 0.15s;
}

.select-content.open {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.select-item {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.15s;
}

.select-item:hover {
    background-color: hsl(var(--accent));
    color: hsl(var(--accent-foreground));
}

.select-item.selected {
    background-color: hsl(var(--accent));
    color: hsl(var(--accent-foreground));
}

.select-item.selected::after {
    content: "✓";
    position: absolute;
    right: 0.75rem;
    font-weight: 600;
}

/* Scrollbar styling */
.select-content::-webkit-scrollbar {
    width: 0.5rem;
}

.select-content::-webkit-scrollbar-track {
    background: hsl(var(--muted));
}

.select-content::-webkit-scrollbar-thumb {
    background: hsl(var(--muted-foreground));
    border-radius: 0.25rem;
}

.select-content::-webkit-scrollbar-thumb:hover {
    background: hsl(var(--foreground));
}