/* Portfolio page styles - converted from BusinessCard.razor.css and GlobalPortfolio components */

/* Core Card */
.business-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.business-card:hover {
    transform: scale(1.02);
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.1);
}

.business-card .card-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Title - 1 line ellipsis */
.text-truncate-1 {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    text-align: left;
}

/* Summary - always takes up 3 lines of height */
.text-fixed-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: calc(1.2em * 3); /* ensures consistent 3-line space */
    white-space: normal;
    text-align: left;
}

/* Date/Location single line truncation */
.text-truncate-1 span {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* Tags area - fixed two lines worth of space */
.tags-container {
    position: relative;
    overflow: hidden;
    height: 2.2rem;
    margin-bottom: 0.3rem;
}

/* Scrollable tags */
.tags-scroll {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.4rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    padding-bottom: 0.25rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.15) transparent; /* Firefox */
    -webkit-overflow-scrolling: touch; /* smoother scroll on touch devices */
}

/* Scrollbar styling (WebKit browsers like Chrome, Edge, Safari) */
.tags-scroll::-webkit-scrollbar {
    height: 0.4rem;
    background-color: transparent;
}

.tags-scroll::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.15);
    border-radius: 1rem;
    transition: background-color 0.25s ease, height 0.25s ease;
}

/* Hover interaction — darker, thicker scrollbar */
.tags-scroll:hover::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.35);
    height: 0.6rem;
}

/* For Firefox */
.tags-scroll:hover {
    scrollbar-color: rgba(0, 0, 0, 0.35) transparent;
}

/* Tag (badge) styling */
.tags-scroll .badge {
    font-size: 0.7rem;
    font-weight: 400;
    flex-shrink: 0;
    max-width: 15rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    text-align: center;
}


/* Sort toggle button styling */
.sort-toggle-btn {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

/* Filter controls */
.bg-light select[multiple] {
    height: auto;
    min-height: 38px;
}

/* Hero header styling (matching GlobalPortfolioHeroHeader.razor) */
.portfolio-hero {
    background: linear-gradient(105deg, #6f42c1 0%, #e91e63 100%);
    min-height: 300px;
}

.portfolio-hero .display-5 {
    font-weight: 600;
}

.portfolio-hero .lead {
    max-width: 800px;
    opacity: 0.95;
}

/* Filter control panel styling */
.portfolio-filters {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.portfolio-filters .dx-textbox,
.portfolio-filters .dx-tagbox,
.portfolio-filters .dx-selectbox {
    width: 100%;
}

/* DevExtreme TagBox adjustments */
.portfolio-filters .dx-tagbox .dx-tag {
    font-size: 0.85rem;
    padding: 2px 8px;
}

/* Sort button and select box group */
.portfolio-filters .sort-group {
    display: flex;
    align-items: stretch;
}

.portfolio-filters .sort-group .dx-button {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    flex-shrink: 0;
}

.portfolio-filters .sort-group .dx-selectbox {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* Action buttons alignment */
.portfolio-filters .action-buttons {
    display: flex;
    gap: 0.5rem;
}

/* Card grid container */
.portfolio-grid {
    min-height: 400px;
}

/* No results message */
.portfolio-grid .no-results {
    padding: 3rem 1rem;
    text-align: center;
    color: #6c757d;
}

/* Pagination styling */
.portfolio-pagination .page-link {
    border-radius: 0.375rem;
}

.portfolio-pagination .page-item.disabled .page-link {
    background-color: transparent;
    border-color: #dee2e6;
}

/* Loading indicator overlay */
.portfolio-loading {
    position: relative;
    min-height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Card hover effects matching Blazor BusinessCard */
.card.business-card {
    cursor: pointer;
    border: 1px solid rgba(0, 0, 0, 0.125);
}

.card.business-card:focus,
.card.business-card:focus-within {
    outline: 2px solid #6f42c1;
    outline-offset: 2px;
}

/* Accessibility: keyboard focus styling */
.card.business-card:focus-visible {
    box-shadow: 0 0 0 3px rgba(111, 66, 193, 0.4);
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .portfolio-hero {
        min-height: 200px;
        padding: 1.5rem 0;
    }

    .portfolio-hero .display-5 {
        font-size: 1.75rem;
    }

    .portfolio-hero .lead {
        font-size: 0.95rem;
    }

    .portfolio-filters .row {
        gap: 0.5rem;
    }
}
