/**
 * Component Styles
 * 
 * @package InsurishLink
 */

/* ==========================================================================
   Sidebar Component
   ========================================================================== */
.site-sidebar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: var(--sidebar-width);
    height: calc(100vh - var(--header-height));
    background-color: var(--color-bg-white);
    box-shadow: 1px 0 3px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    z-index: 90;
}

/* Adjust for admin bar */
body.admin-bar .site-sidebar {
    top: calc(var(--header-height) + 32px);
    height: calc(100vh - var(--header-height) - 32px);
}

@media screen and (max-width: 782px) {
    body.admin-bar .site-sidebar {
        top: calc(var(--header-height) + 46px);
        height: calc(100vh - var(--header-height) - 46px);
    }
}

/* User Profile */
.sidebar-user {
    padding: 20px;
    border-bottom: 1px solid var(--color-border-light);
    text-align: center;
}

.sidebar-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    font-weight: 600;
}

.sidebar-avatar img {
  display: block;       
  width: 64px;          
  height: 64px;
  object-fit: cover;   
  border-radius: 50%;   
}

.sidebar-username {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 4px;
}

.sidebar-role {
    font-size: 13px;
    color: var(--color-text-light);
}

/* Sidebar Navigation */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
}

.sidebar-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--color-text-light);
    text-decoration: none;
    transition: all var(--transition-normal);
    font-size: 14px;
    cursor: pointer;
}

.sidebar-item:hover {
    background-color: var(--color-bg);
    color: var(--color-text);
}

.sidebar-item.active {
    background-color: var(--color-bg);
    color: var(--color-primary);
    font-weight: 500;
}

.sidebar-item-icon {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

/* Sidebar Bottom */
.sidebar-bottom {
    border-top: 1px solid var(--color-border-light);
    padding: 10px 0;
}

/* ==========================================================================
   Search Bar Component
   ========================================================================== */
.search-bar,
.mobile-search-bar {
    position: relative;
    width: 100%;
}

.search-input {
    width: 100%;
    padding: 10px 40px 10px 15px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    font-size: 14px;
    background-color: var(--color-bg-white);
    transition: border-color var(--transition-fast);
}

.search-input:focus {
    outline: none;
    border-color: var(--color-primary);
}

.mobile-search-bar .search-input {
    padding: 12px 40px 12px 15px;
    font-size: 16px;
}

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted);
    pointer-events: none;
}

/* Autocomplete Dropdown */
.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-top: none;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    max-height: 300px;
    overflow-y: auto;
    display: none;
    z-index: 100;
    box-shadow: var(--shadow-md);
}

.autocomplete-dropdown.active {
    display: block;
}

.autocomplete-header {
    padding: 8px 15px;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-light);
    background-color: var(--color-bg);
    border-bottom: 1px solid var(--color-border-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
    z-index: 1;
}

.autocomplete-item {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid var(--color-border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    transition: background-color var(--transition-fast);
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-item.selected {
    background-color: var(--color-bg);
}

.autocomplete-item .category-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    background-color: var(--color-primary);
    color: white;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Mobile Search Container */
.mobile-search-container {
    margin-bottom: 20px;
}

/* ==========================================================================
   Insurance Applications Section
   ========================================================================== */
.insurance-applications-section {
    background-color: var(--color-bg-white);
    border-radius: var(--radius-xl);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.applications-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.applications-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.applications-title span {
    font-weight: 400;
    color: var(--color-text-light);
}
/* Filter Message */
.filter-message {
    text-align: center;
    padding: 20px;
    color: var(--color-text-light);
    font-size: 14px;
    background-color: var(--color-bg);
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
}

/* ==========================================================================
   Carrier Cards Grid
   ========================================================================== */
.insurance-companies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 24px;
    align-items: stretch;
}

/* ==========================================================================
   Carrier Card Component
   ========================================================================== */
.insurance-company-card {
    background-color: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: 22px;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 450px;
    transition: all var(--transition-fast);
}

.insurance-company-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.insurance-company-card.hidden {
    display: none;
}

/* new styles for adding managing line of business bubbles */
.insurance-company-card .insurance-category {
    min-height: 62px;
}

.lob-badge--more {
    background-color: #ced4da;
    color: #212529;
    font-weight: 500;
}

.lob-badge--none {
    background-color: transparent;
    color: #999;
    border: 1px solid #eee;
}



/* Company Logo */
.company-logo {
    width: 200px;
    height: 170px;
    margin: 0 auto 16px;
    /* display: flex; */
    /* align-items: center; */
    /* justify-content: center; */
    /* border-radius: var(--radius-lg); */
    /* padding: 10px; */
    /* background-color: var(--color-bg-light); */
    /* border: 1px solid #f3f4f6; */
}


.company-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.company-logo.placeholder {
    background-color: var(--color-border);
    font-size: 26px;
    font-weight: 600;
    color: #6b7280;
    border: none;
}

/* Company Name */
.company-name {
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 16px;
    text-align: left;
    line-height: 1.3;
}

/* Insurance Category */
.insurance-category {
    margin-top: 12px;
    margin-bottom: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    row-gap: 8px;
    align-items: flex-start;
}

.card-spacer {
    flex: 1;
    min-height: 8px;
}

/* LOB Badge */
.lob-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    background-color: #f3f4f6;
    border: 1px solid var(--color-border);
    border-radius: 16px;
    font-size: 12px;
    color: #4b5563;
    white-space: nowrap;
    transition: all var(--transition-fast);
    line-height: 1;
    height: 26px;
}

.lob-badge:hover {
    background-color: var(--color-border);
    border-color: var(--color-border-dark);
}

/* View Details Button */
.view-details-btn {
    display: block;
    width: 100%;
    padding: 11px 20px;
    background-color: var(--color-primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    transition: all var(--transition-fast);
    text-transform: uppercase;
    letter-spacing: 0.75px;
    text-align: center;
    text-decoration: none;
	margin-bottom: 10px;
}

.view-details-btn:hover {
    background-color: var(--color-primary-dark);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 138, 0, 0.2);
    text-decoration: none;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.btn-primary {
    background-color: var(--color-primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--color-primary-dark);
}

.btn-secondary {
    background-color: var(--color-secondary);
    color: white;
}

.btn-secondary:hover {
    background-color: var(--color-secondary-dark);
}


/* ==========================================================================
   Pagination
   ========================================================================== */
.navigation.pagination {
  margin-top: 2.5rem;
  text-align: center;
}

.navigation.pagination .nav-links {
  display: inline-flex;
  gap: 0.5rem;
  background: var(--color-bg-white);
  padding: 0.5rem;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-normal), background var(--transition-fast);
}

.navigation.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 0.75rem;
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.navigation.pagination .page-numbers:hover {
  background: var(--color-bg-light);
  color: var(--color-text);
}

.navigation.pagination .page-numbers.current {
  background: var(--color-primary);
  color: var(--color-bg-white);
}
