.page-companies h2 {
    font-size: 30px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #e6f0ff;
    text-align: left;
}

/* Search Wrapper */
.search-wrapper {
    position: relative;
    margin-bottom: 15px;
}

/* Search Bar */
.search-container {
    display: flex;
    align-items: center;
    background-color: white;
    border-radius: 10px;
    padding: 10px 15px;
    border: 1px solid #d9eaff;
    gap: 15px;
}

.search-container input {
    border: none;
    outline: none;
    width: 100%;
    font-size: 16px;
}

/* Filter Chips */
.chips {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.chip {
    padding: 8px 16px;
    background-color: #e6f0ff;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    border: 1px solid #c2d8ff;
}

.chip.active {
    background-color: #007bff;
    color: white;
}

/* Company Card */
.company-card {
    background: white;
    padding: 16px 18px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    border-left: 4px solid #f59e0b;
    cursor: pointer;
    transition: box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 140px;
    max-height: 200px;
    overflow: hidden;
}

.company-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.company-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 8px;
    flex-shrink: 0;
}

.company-title {
    font-weight: 700;
    font-size: 15px;
    color: #1d4ed8;
    flex: 1;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.company-desc {
    margin-top: 6px;
    font-size: 14px;
    color: #555;
}

.company-profile {
    margin-top: 6px;
    font-size: 13px;
    color: #555;
    line-height: 1.5;
    flex: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
}

.read-more-link {
    color: #555;
    font-weight: 500;
    cursor: pointer;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    display: flex;
    justify-content: space-around;
    padding: 16px 20px;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.1);
    z-index: 100;
    /* Safe area for notched devices */
    padding-bottom: max(16px, env(safe-area-inset-bottom));
}

.nav-item {
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666;
    white-space: nowrap;
    text-align: center;
}

.nav-item:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.nav-item.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}


#companyList {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    width: 100%;
    align-items: stretch;
}

#companyList > * {
    min-width: 0;
}

@media (max-width: 1100px) {
    #companyList {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 700px) {
    #companyList {
        grid-template-columns: 1fr;
    }

    .company-card {
        max-height: none;
    }

    .company-profile {
        -webkit-line-clamp: 3;
    }
}

.booth-number {
  background: #f0f4ff;
  color: #4f46e5;
  border: 1px solid #d4e0ff;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.filter-container {
  margin: 12px 0 20px;
}

.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
  padding: 12px 0;
}

.tags-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}

#tagsList {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-chip {
  padding: 8px 14px;
  border-radius: 20px;
  background: white;
  color: #333;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
  border: 1px solid #d9eaff;
  transition: all 0.15s ease;
}

.tag-chip:hover {
  border-color: #667eea;
  background: #f8faff;
}

.tag-chip.active {
  background: #4338ca;
  color: white;
  border-color: #4338ca;
}


.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-width: 500px;
    background: #ffffff;
    border: 1px solid #e1e9f6;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    margin-top: 8px;
    z-index: 1000;
    overflow: hidden;
}

.search-suggestion {
    padding: 12px 16px;
    cursor: pointer;
    font-size: 14px;
    color: #1a2b4b;
    border-bottom: 1px solid #f0f4ff;
    transition: background 0.15s ease;
}

.search-suggestion:last-child {
    border-bottom: none;
}

.search-suggestion:hover {
    background: #f0f4ff;
}

.empty-state {
  text-align: center;
  padding: 80px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 20px;
  opacity: 0.8;
}

.empty-state h3 {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 600;
  color: #1a1a2e;
}

.empty-state p {
  margin: 0 0 24px;
  font-size: 15px;
  color: #555;
  max-width: 320px;
}

.reset-btn, .reset-btn2 {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    white-space: nowrap;
    flex-shrink: 0;
}

.reset-btn:hover, .reset-btn2:hover {
    opacity: 0.9;
}


/* Custom Dropdown */
.custom-dropdown {
  position: relative;
  width: 100%;
}

.dropdown-selected {
  width: 100%;
  padding: 12px 16px;
  padding-right: 40px;
  border-radius: 10px;
  border: 1px solid #d9eaff;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  background-color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dropdown-arrow {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #667eea;
  transition: transform 0.2s ease;
}

.custom-dropdown.open .dropdown-arrow {
  transform: rotate(180deg);
}

.custom-dropdown.open .dropdown-selected {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.dropdown-options {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  background: white;
  border: 1px solid #d9eaff;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  z-index: 1000;
  max-height: 300px;
  overflow-y: auto;
}

.dropdown-options::-webkit-scrollbar {
  width: 8px;
}

.dropdown-options::-webkit-scrollbar-track {
  background: #f0f4ff;
  border-radius: 0 10px 10px 0;
}

.dropdown-options::-webkit-scrollbar-thumb {
  background: #667eea;
  border-radius: 4px;
}

.dropdown-option {
  padding: 10px 16px;
  font-size: 14px;
  cursor: pointer;
  border-bottom: 1px solid #f0f4ff;
  transition: background 0.15s ease;
}

.dropdown-option:last-child {
  border-bottom: none;
}

.dropdown-option:hover {
  background: #f0f4ff;
}

.dropdown-option.selected {
  background: #eef2ff;
  color: #4338ca;
  font-weight: 600;
}



@media (max-width: 768px) {
    .page-companies h2 {
        font-size: 24px;
        margin-bottom: 16px;
    }

    .nav-item {
        padding: 10px 18px;
        font-size: 13px;
    }

    .reset-btn, .reset-btn2 {
        padding: 10px 16px;
        font-size: 12px;
        font-weight: 500;
    }

    .search-container {
        flex-wrap: wrap;
        gap: 10px;
        padding: 10px 12px;
    }

    .search-container input {
        min-width: 100%;
        flex: 1 1 100%;
    }

    .company-card {
        padding: 14px 16px;
        min-height: 120px;
        max-height: 180px;
    }

    .company-title {
        font-size: 14px;
    }

    .company-profile {
        font-size: 12px;
        -webkit-line-clamp: 4;
    }

    .booth-number {
        font-size: 11px;
        padding: 2px 6px;
    }

    .chips {
        gap: 8px;
        padding-bottom: 8px;
    }

    .chip {
        padding: 6px 12px;
        font-size: 13px;
    }

    .dropdown-selected {
        padding: 10px 14px;
        font-size: 13px;
    }

    .dropdown-option {
        padding: 8px 14px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .page-companies h2 {
        font-size: 20px;
        margin-bottom: 12px;
    }

    .search-container {
        padding: 8px 10px;
        gap: 8px;
    }

    .search-container input {
        font-size: 14px;
    }

    .company-card {
        padding: 12px 14px;
    }

    .company-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .booth-number {
        margin-left: 0;
    }

    .nav-item {
        padding: 8px 14px;
        font-size: 12px;
    }

    .bottom-nav {
        padding: 12px 16px;
    }

    .reset-btn, .reset-btn2 {
        padding: 8px 14px;
        font-size: 11px;
        width: 100%;
    }

    .tag-chip {
        padding: 5px 10px;
        font-size: 12px;
    }
}

.company-card.company-full {
  opacity: 0.45;
  filter: grayscale(100%);
  pointer-events: none; /* disables clicks */
}

.badge {
  display: inline-block;
  padding: 3px 8px;
  background: #9ca3af;
  color: white;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.fully-booked-badge {
  background: #ef4444;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loading-content {
    text-align: center;
    color: white;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 24px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
}

.loading-subtext {
    font-size: 14px;
    opacity: 0.9;
}

.loading-dots {
    display: inline-block;
}

.loading-dots span {
    animation: blink 1.4s infinite;
    animation-fill-mode: both;
}

.loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes blink {
    0%, 80%, 100% { opacity: 0; }
    40% { opacity: 1; }
}

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}
.head-right {
    font-size: 18px;
    font-weight: 600;
    color: #0d6efd;
    background: #eef4ff;
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid #cfe0ff;
    white-space: nowrap;
}
#meetingCount {
    font-size: 18px;
    font-weight: 700;
    color: #083ea8;
}
@media (max-width: 600px) {
    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .head-right {
        width: 90%;
        text-align: center;
    }
}