/* ============================================
   PORTAL SHARED STYLES
   Tab navigation and layout for Power Pages portal
   ============================================ */

:root {
  /* Brand Colors */
  --primary: #002d72;
  --primary-light: #1a4a8f;
  --primary-dark: #001d4d;
  --accent: #f6be00;
  --accent-light: #ffd54f;
  --danger: #ea0029;
  --danger-light: #ff5252;
  
  /* Neutrals */
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  
  /* Semantic */
  --success: #059669;
  --success-light: #d1fae5;
  --warning: #d97706;
  --warning-light: #fef3c7;
  --info: #0284c7;
  --info-light: #e0f2fe;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  
  /* Radius */
  --radius-sm: 6px;
  --radius: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition: 200ms ease;
  --transition-slow: 300ms ease;
}

/* ============================================
   PAGE CONTAINER
   ============================================ */
.portal-page-container {
  padding: 0 1.5rem;
}

.portal-content {
  margin-top: 60px;
}

/* ============================================
   TABS NAVIGATION
   ============================================ */
.nav-tabs {
  border-bottom: 2px solid var(--gray-200);
  margin-bottom: 1.5rem !important;
}

.nav-tabs .nav-item {
  margin-bottom: 0;
}

.nav-tabs .nav-link {
  border: 2px solid transparent;
  border-bottom-color: transparent;
  border-radius: 0;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-500);
  background: transparent;
  margin-bottom: 1px;
}

.nav-tabs .nav-link:hover {
  color: var(--primary);
  background: var(--gray-50);
  border-color: transparent;
}

.nav-tabs .nav-link.active {
  color: var(--primary);
  font-weight: 600;
  border-color: transparent;
}

/* ============================================
   TAB CONTENT
   ============================================ */
.tab-content {
  overflow: visible;
}

.tab-pane {
  padding: 0;
}

/* ============================================
   MOBILE TAB DROPDOWN
   ============================================ */
.mobile-tab-dropdown {
  display: none;
  margin-bottom: 1rem;
}

.mobile-tab-select {
  width: 100%;
  padding: 0.75rem 1rem;
  padding-right: 2.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-800);
  background-color: white;
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.75rem center;
  background-repeat: no-repeat;
  background-size: 1.25rem;
}

.mobile-tab-select:focus {
  outline: none;
  border-color: var(--primary);
}

/* ============================================
   TOGGLE SWITCH
   ============================================ */
.form-check.form-switch {
  display: inline-flex;
  align-items: center;
  padding-left: 1rem;
  margin-bottom: 1rem;
}

.form-check.form-switch .form-check-input {
  width: 40px;
  height: 22px;
  margin-left: 0;
  margin-right: 0.5rem;
  cursor: pointer;
  background-color: var(--gray-300);
  border: none;
  border-radius: 22px;
}

.form-check.form-switch .form-check-input:checked {
  background-color: var(--primary);
}

.form-check.form-switch .form-check-input:focus {
  box-shadow: 0 0 0 3px rgba(0, 45, 114, 0.15);
}

.form-check-label {
  cursor: pointer;
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--gray-800);
}

/* ============================================
   ENTITY LIST COLORS
   ============================================ */
.entity-list table thead th,
.entitylist table thead th {
  background: var(--gray-50) !important;
  border-bottom-color: var(--gray-200) !important;
  color: var(--gray-500);
}

.entity-list table tbody tr:hover,
.entitylist table tbody tr:hover {
  background: var(--gray-50) !important;
}

.entity-list table a,
.entitylist table a {
  color: var(--primary);
}

.entity-list table a:hover,
.entitylist table a:hover {
  color: var(--primary-light);
}

.entity-list .pagination .page-item.active .page-link,
.entitylist .pagination .page-item.active .page-link {
  background: var(--primary);
  border-color: var(--primary);
}

.entity-list .btn-primary,
.entitylist .btn-primary {
  background: var(--primary);
  border-color: var(--primary);
}

.entity-list .btn-primary:hover,
.entitylist .btn-primary:hover {
  background: var(--primary-light);
  border-color: var(--primary-light);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .nav-tabs {
    display: none !important;
  }
  
  .mobile-tab-dropdown {
    display: block;
  }
  
  .portal-page-container {
    padding: 0 0.75rem;
  }
  
  .portal-content {
    margin-top: 1rem;
  }
}
