/* Sea Change Australia Custom Styles - Bootstrap Compatible */

/* Import Barlow font from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Barlow:ital,wght@0,400;0,600;0,700;1,400&display=swap');

/* CSS Variables for Sea Change Brand Colors */
:root {
  --color-navy: #0B1F41;
  --color-still-blue: #4C8FCC;
  --color-red: #EE3123;
  --color-pale-blue: #A9D1D9;
  --color-ocean-blue: #3455A6;
  
  /* Bootstrap custom color overrides */
  --bs-primary: var(--color-still-blue);
  --bs-primary-rgb: 76, 143, 204;
  --bs-secondary: #6c757d;
  --bs-secondary-rgb: 108, 117, 125;
  --bs-secondary-hover: #5a6268;
  --bs-danger: var(--color-red);
  --bs-danger-rgb: 238, 49, 35;
  --bs-dark: var(--color-navy);
  --bs-dark-rgb: 11, 31, 65;
  --bs-success: #3CB371;
  --bs-duccess-rgb: 60, 179, 113;
  --bs-warning: #FFCB6B;
  --bs-warning-rgb: 255, 203, 107;
  --bs-info: var(--color-pale-blue);
  --bs-info-rgb: 169, 209, 217;
  
  /* Gradients */
  --gradient-primary: linear-gradient(30deg, var(--color-ocean-blue), var(--color-still-blue), var(--color-red));
  --gradient-secondary: linear-gradient(30deg, var(--color-still-blue), var(--color-pale-blue));
  
  /* Typography */
  --font-family-primary: 'Barlow', sans-serif;
  
  /* Spacing variables */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;

  --bs-gutter-x: 4.5rem;

  /* assignment Status Colors */
  --status-assigned: var(--color-still-blue);
  --status-accepted: var(--bs-success);
  --status-declined: var(--bs-danger);
  --status-responded: var(--bs-secondary);
  --status-unassigned-by-admin: var(--bs-danger);

  /* Answer Status Colors */
  --status-draft: var(--bs-warning);
  --status-awaiting: var(--color-pale-blue);
  --status-rejected: var(--bs-danger);
  --status-published:       #8E7CC3;
}

/* Override Bootstrap's font family */
body {
  font-family: var(--font-family-primary) !important;
  color: var(--color-navy);
}

/* Typography overrides for Bootstrap */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-primary) !important;
  font-weight: 700;
  color: var(--color-navy);
}

/* Link colors */
a {
  color: var(--color-still-blue);
  transition: color 0.3s ease;
}

a:hover {
  color: var(--color-ocean-blue);
}

.btn {
  border-radius: 25px;
  font-family: var(--font-family-primary);
  font-weight: 600;
  padding: 0.75rem 2rem;
}

.btn-sm {
  padding: 0.5rem 1.5rem;
  font-size: 0.875rem;
}

/* Bootstrap button overrides */
.btn-primary {
  background-color: var(--color-still-blue);
  border-color: var(--color-still-blue);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background-color: var(--color-ocean-blue);
  border-color: var(--color-ocean-blue);
}

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

.btn-secondary:hover,
.btn-secondary:focus,
.btn-secondary:active {
  background-color: var(--bs-secondary-hover);
  border-color: var(--bs-secondary-hover);
}

.btn-danger {
  background-color: var(--color-red);
  border-color: var(--color-red);
}

.btn-danger:hover,
.btn-danger:focus,
.btn-danger:active {
  background-color: #d12717;
  border-color: #d12717;
}

/* Custom button styles to match Sea Change site */
.btn-outline-white {
  background-color: transparent;
  border: 2px solid white;
  color: white;
  transition: all 0.3s ease;
}

.btn-outline-white:hover {
  background-color: white;
  color: var(--color-navy);
  border-color: white;
}

.btn-outline-primary {
  background-color: transparent;
  border: 2px solid var(--color-still-blue);
  color: var(--color-still-blue);
  transition: all 0.3s ease;
}

.btn-outline-primary:hover {
  background-color: var(--color-still-blue);
  color: white;
  border-color: var(--color-still-blue);
}

/* Header and Navigation - Matches Sea Change site */
.header {
  background-color: var(--color-navy);
  color: white;
  padding: 0.4rem 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header .logo {
  height: 62px;
  width: auto;
}

.header .navbar-nav .nav-link {
  color: white !important;
  font-weight: 500;
  margin-left: 1.5rem;
  transition: color 0.3s ease;
}

.header .navbar-nav .nav-link:hover {
  color: var(--color-pale-blue) !important;
}

/* Hero Section with Gradient Background */
.hero-section {
  background: var(--gradient-primary);
  color: white;
  padding: 4rem 0;
  text-align: left;
}

.hero-section h1 {
  font-size: 3.5rem;
  font-weight: 700;
  color: white;
  margin-bottom: 2rem;
  line-height: 1.2;
}

.hero-section p {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  opacity: 0.95;
}

.hero-section .btn {
  margin-top: 1rem;
}

/* Section styling */
.content-section {
  padding: 4rem 0;
  background-color: #f8f9fa;
}

.content-section h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: var(--color-still-blue);
}

.content-section h2 span.text-gradient {
  background: linear-gradient(45deg, var(--color-still-blue), var(--color-red));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* SeaMap Portal Sidebar - Unified styling for Expert and Admin portals */
.seamap-sidebar {
  background-color: var(--color-navy);
  min-height: calc(100vh - 120px);
  padding: 0;
  box-shadow: 2px 0 4px rgba(0,0,0,0.1);
}

.seamap-sidebar .position-sticky {
  padding: 1.5rem;
}

.seamap-portal-header {
  border-bottom: 1px solid rgba(255,255,255,0.2);
  padding-bottom: 1rem;
}

.seamap-portal-header h5 {
  color: white;
  font-family: var(--font-family-primary);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.seamap-nav .nav-link {
  color: rgba(255,255,255,0.8);
  font-family: var(--font-family-primary);
  font-weight: 500;
  padding: 0.75rem 0;
  border-radius: 0;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
  margin-bottom: 0.25rem;
}

.seamap-nav .nav-link:hover {
  color: white;
  background-color: rgba(255,255,255,0.1);
  border-left-color: var(--color-still-blue);
}

.seamap-nav .nav-link.active {
  color: white;
  background-color: var(--color-still-blue);
  border-left-color: var(--color-pale-blue);
}

.seamap-nav .nav-link i {
  width: 1.25rem;
  text-align: center;
}

.seamap-nav .nav-link.text-muted {
  color: rgba(255,255,255,0.5) !important;
}

.seamap-nav .nav-link.text-muted:hover {
  color: rgba(255,255,255,0.7) !important;
  background-color: transparent;
  border-left-color: transparent;
}

/* SeaMap Navigation Section Headers */
.seamap-nav .nav-section-header {
  color: white;
  font-family: var(--font-family-primary);
  font-weight: 600;
  padding: 0.75rem 0 0.5rem 0;
  border-radius: 0;
  background: none;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.9;
}

/* SeaMap Navigation Sub-links */
.seamap-nav .nav-sub-link {
  color: rgba(255,255,255,0.7);
  font-family: var(--font-family-primary);
  font-weight: 400;
  padding: 0.5rem 0 0.5rem 1rem;
  border-radius: 0;
  transition: all 0.3s ease;
  border-left: 2px solid transparent;
  margin-bottom: 0.1rem;
  font-size: 0.9rem;
}

.seamap-nav .nav-sub-link:hover {
  color: white;
  background-color: rgba(255,255,255,0.08);
  border-left-color: var(--color-still-blue);
}

.seamap-nav .nav-sub-link.active {
  color: white;
  background-color: rgba(76, 143, 204, 0.3);
  border-left-color: var(--color-pale-blue);
}

.seamap-nav .nav-sub-link i {
  width: 1rem;
  text-align: center;
  font-size: 0.8rem;
}

/* SeaMap Content Area */
.seamap-content-area {
  padding: 2rem 0;
  min-height: calc(100vh - 140px);
}

/* Mobile responsive sidebar */
@media (max-width: 767.98px) {
  .seamap-sidebar {
    min-height: auto;
    background-color: var(--color-navy);
    border-bottom: 1px solid var(--color-pale-blue);
  }
  
  .seamap-nav {
    flex-direction: row;
    overflow-x: auto;
    white-space: nowrap;
  }
  
  .seamap-nav .nav-item {
    flex-shrink: 0;
  }
  
  .seamap-nav .nav-link {
    padding: 0.5rem 1rem;
    margin-right: 0.5rem;
    border-left: none;
    border-bottom: 3px solid transparent;
  }
  
  .seamap-nav .nav-link:hover,
  .seamap-nav .nav-link.active {
    border-left: none;
    border-bottom-color: var(--color-still-blue);
  }
}


/* Bootstrap card enhancements */
.card:hover {
  box-shadow: 0 4px 8px rgba(11, 31, 65, 0.15);
  transition: box-shadow 0.3s ease;
}

/* Status card hover effect */
.status-card-hover {
  cursor: pointer;
  transition: all 0.3s ease;
}

.status-card-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(11, 31, 65, 0.2) !important;
}

.card-header {
  border-bottom-color: var(--color-pale-blue);
}

.card-title {
  color: var(--color-navy);
  font-family: var(--font-family-primary);
  font-weight: 700;
}

/* Expert Question Action Cards */
.expert-action-card {
  width: 70%;
  border: 2px solid var(--color-pale-blue);
  box-shadow: 0 2px 8px rgba(11, 31, 65, 0.1);
  transition: all 0.3s ease;
}

.expert-action-card:hover {
  border-color: var(--color-still-blue);
  box-shadow: 0 4px 12px rgba(11, 31, 65, 0.2);
  transform: translateY(-2px);
}

.expert-action-card .card-title {
  color: var(--color-still-blue);
  font-family: var(--font-family-primary);
  font-weight: 600;
}

.expert-action-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

/* Bootstrap form enhancements */
.form-control:focus {
  border-color: var(--color-still-blue);
  box-shadow: 0 0 0 0.2rem rgba(76, 143, 204, 0.25);
}

.form-select:focus {
  border-color: var(--color-still-blue);
  box-shadow: 0 0 0 0.2rem rgba(76, 143, 204, 0.25);
}

.form-label {
  font-weight: 600;
  color: var(--color-navy);
  font-family: var(--font-family-primary);
}

/* Enhanced checkbox styling */
.form-check-input {
  border: 1px solid var(--color-navy);
  background-color: white;
  transform: scale(1.2);
}

.form-check-input:checked {
  background-color: var(--color-still-blue);
  border-color: var(--color-still-blue);
}

.form-check-input:focus {
  border-color: var(--color-ocean-blue);
  box-shadow: 0 0 0 0.2rem rgba(76, 143, 204, 0.25);
}

/* Status Badges */
.badge {
  display: inline-block;
  padding: var(--spacing-xs) var(--spacing-sm);
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.nav-item .badge {
  margin-left: 0.5rem;
  background-color: rgba(255, 255, 255, 0.7);
  color: var(--color-navy);
  border-radius: 12px;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  transition: background-color 0.3s ease;
}

/* Status badges */
.badge-assigned { background-color: var(--status-assigned); color: white; }
.badge-accepted { background-color: var(--status-accepted); color: white; }
.badge-declined { background-color: var(--status-declined); color: white; }
.badge-responded { background-color: var(--status-responded); color: white; }
.badge-unassigned-by-admin { background-color: var(--status-unassigned-by-admin); color: white; }

.badge-draft { background-color: var(--status-draft); color: black; }
.badge-awaiting { background-color: var(--status-awaiting); color: var(--color-navy); }
.badge-rejected { background-color: var(--status-rejected); color: white; } 
.badge-published { background-color: var(--status-published); color: white; }

.badge-readonly { background-color: var(--bs-secondary); color: white; }

/* User type badges */
.badge-admin { background-color: var(--color-red); color: white; width: 100px; }
.badge-expert { background-color: var(--color-navy); color: white; width: 100px; }
.badge-asker { background-color: var(--color-ocean-blue); color: white; width: 100px; }

/* Approval badges */
.badge-approved { background-color: var(--bs-success); color: white; width: 110px; }
.badge-pending { background-color: var(--bs-warning); color: var(--color-navy); width: 110px; }

/* Status text colors */
.text-assigned { color: var(--status-assigned); }
.text-accepted { color: var(--status-accepted); }
.text-declined { color: var(--status-declined); }
.text-responded { color: var(--status-responded); }
.text-unassigned-by-admin { color: var(--status-unassigned-by-admin); }
.text-draft { color: var(--status-draft); }
.text-awaiting { color: var(--status-awaiting); }
.text-rejected { color: var(--status-rejected); }
.text-published { color: var(--status-published); }

/* Gradient backgrounds */
.bg-gradient-primary {
  background: var(--gradient-primary);
  color: white;
}

.bg-gradient-secondary {
  background: var(--gradient-secondary);
  color: var(--color-navy);
}

.section-divider {
  width: 60px;
  height: 4px;
  background: var(--color-ocean-blue);
  border: none;
  margin: 0;
}


/* Footer */
.footer {
  background-color: black;
  color: white;
  padding: var(--spacing-xl) 0;
  margin-top: var(--spacing-2xl);
}

.footer a {
  color: var(--color-pale-blue);
}

.footer a:hover {
  color: white;
}

/* Filter Pills */
.filter-pill {
    background-color: var(--color-still-blue);
    color: white;
    border-radius: 20px;
    font-family: var(--font-family-primary);
    font-weight: 500;
    border: 1px solid var(--color-still-blue);
    transition: all 0.2s ease;
}

.filter-pill:hover {
    background-color: var(--color-ocean-blue);
    border-color: var(--color-ocean-blue);
}

.filter-pill .remove-filter {
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.filter-pill .remove-filter:hover {
    opacity: 1;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

/* Clear all pill styling */
.filter-pill.clear-all {
    background-color: var(--bs-secondary);
    border-color: var(--bs-secondary);
    color: white;
}

.filter-pill.clear-all:hover {
    background-color: var(--bs-secondary-hover);
    border-color: var(--bs-secondary-hover);
    color: white;
}

/* ===== TABLE COMPONENTS ===== */

/* Primary table styling - used across admin, expert, and public sections */
.table-primary th {
    border-top: none;
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: 0.025em;
    background-color: var(--color-navy);
    color: white;
    font-family: var(--font-family-primary);
}

.table-primary td {
    vertical-align: middle;
    font-size: 0.875rem;
    color: var(--color-navy);
    font-family: var(--font-family-primary);
    border-color: var(--color-pale-blue);
    background-color: white;
}

.table-primary.table-hover tbody tr:hover {
    background-color: rgba(169, 209, 217, 0.1);
}

/* Clickable table rows */
.clickable-row {
    transition: background-color 0.2s ease;
}

.clickable-row:hover {
    background-color: rgba(169, 209, 217, 0.2) !important;
}

/* Sortable table headers */
.table-sort-header {
    color: white !important;
    font-family: var(--font-family-primary);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    transition: color 0.2s ease;
    text-decoration: none;
}

.table-sort-header:hover {
    color: var(--color-pale-blue) !important;
    text-decoration: none;
}

.table-sort-header i {
    font-size: 0.8em;
    opacity: 0.8;
    margin-left: 0.25rem;
}

.table-sort-header:hover i {
    opacity: 1;
}

/* ===== CARD COMPONENTS ===== */

.card-primary {
    border: 1px solid var(--color-pale-blue);
    box-shadow: 0 2px 8px rgba(11, 31, 65, 0.1);
}

/* ===== PAGINATION COMPONENTS ===== */

.pagination-primary .page-link {
    color: var(--color-still-blue);
    border-color: var(--color-pale-blue);
    font-family: var(--font-family-primary);
}

.pagination-primary .page-link:hover {
    color: var(--color-ocean-blue);
    background-color: rgba(169, 209, 217, 0.1);
    border-color: var(--color-still-blue);
}

.pagination-primary .page-item.active .page-link {
    background-color: var(--color-still-blue);
    border-color: var(--color-still-blue);
    color: white;
}

/* ===== TEXT COMPONENTS ===== */

.text-content-primary {
    line-height: 1.4;
    color: var(--color-navy);
    font-family: var(--font-family-primary);
}

/* ===== MODAL COMPONENTS ===== */

/* Consistent modal styling across all templates */
.modal-primary .modal-content {
    border: 1px solid var(--color-pale-blue);
    box-shadow: 0 4px 16px rgba(11, 31, 65, 0.2);
}

.modal-primary .modal-header {
    background-color: var(--color-navy);
    color: white;
    border-bottom: 1px solid var(--color-pale-blue);
    font-family: var(--font-family-primary);
}

.modal-primary .modal-title {
    font-family: var(--font-family-primary);
    font-weight: 600;
    color: white;
}

.modal-primary .modal-body {
    font-family: var(--font-family-primary);
    color: var(--color-navy);
}

.modal-primary .modal-body .form-label {
    color: var(--color-navy);
    font-weight: 600;
    font-family: var(--font-family-primary);
}

.modal-primary .modal-body .form-text {
    color: var(--color-navy);
    font-family: var(--font-family-primary);
}

.modal-primary .modal-footer {
    border-top: 1px solid var(--color-pale-blue);
}

/* Warning icon styling in modals */
.modal-icon-warning {
    color: var(--bs-warning);
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
  .container {
    padding: 0 var(--spacing-md);
  }
  
  .col-6, .col-4, .col-3 {
    flex: 0 0 100%;
  }
  
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.5rem; }
}

/* ===== TOAST UI EDITOR STYLES ===== */

/* Main editor container styling */
.toastui-editor-defaultUI {
  border: 1px solid var(--color-pale-blue) !important;
  border-radius: 8px !important;
  font-family: var(--font-family-primary) !important;
}

/* Toolbar styling */
.toastui-editor-defaultUI .ProseMirror {
  font-family: var(--font-family-primary) !important;
  font-size: 14px !important;
  line-height: 1.6 !important;
  color: var(--color-navy) !important;
}

/* Editor content area */
.toastui-editor-contents {
  font-family: var(--font-family-primary) !important;
}

/* Toolbar buttons */
.toastui-editor-toolbar button {
  color: var(--color-navy) !important;
  border-radius: 4px !important;
}

.toastui-editor-toolbar button:hover {
  background-color: var(--color-pale-blue) !important;
  color: var(--color-navy) !important;
}

.toastui-editor-toolbar button.active {
  background-color: var(--color-still-blue) !important;
  color: white !important;
}

/* Mode switch tabs */
.toastui-editor-mode-switch {
  border-bottom: 1px solid var(--color-pale-blue) !important;
}

.toastui-editor-mode-switch .tab-item {
  color: var(--color-navy) !important;
  font-family: var(--font-family-primary) !important;
  font-weight: 600 !important;
}

.toastui-editor-mode-switch .tab-item.active {
  color: var(--color-still-blue) !important;
  border-bottom-color: var(--color-still-blue) !important;
}

/* Placeholder text */
.toastui-editor-contents .ProseMirror p.is-empty:first-child::before {
  color: #6c757d !important;
  font-family: var(--font-family-primary) !important;
}

/* Preview area */
.toastui-editor-md-preview {
  font-family: var(--font-family-primary) !important;
  color: var(--color-navy) !important;
}

/* Markdown preview styling */
.toastui-editor-md-preview h1,
.toastui-editor-md-preview h2,
.toastui-editor-md-preview h3,
.toastui-editor-md-preview h4,
.toastui-editor-md-preview h5,
.toastui-editor-md-preview h6 {
  color: var(--color-navy) !important;
  font-family: var(--font-family-primary) !important;
  font-weight: 700 !important;
}

.toastui-editor-md-preview a {
  color: var(--color-still-blue) !important;
}

.toastui-editor-md-preview a:hover {
  color: var(--color-ocean-blue) !important;
}

/* Dropdown menus */
.toastui-editor-dropdown-toolbar {
  border: 1px solid var(--color-pale-blue) !important;
  border-radius: 8px !important;
  font-family: var(--font-family-primary) !important;
}

/* Focus states */
.toastui-editor-defaultUI.focused {
  border-color: var(--color-still-blue) !important;
  box-shadow: 0 0 0 0.2rem rgba(76, 143, 204, 0.25) !important;
}

/* ===== ANSWER COMMENTS STYLES ===== */

.comments-thread {
    max-height: 400px;
    overflow-y: auto;
}

.comment-item {
    position: relative;
}

.comment-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 16px;
    top: 48px;
    bottom: -12px;
    width: 1px;
    background-color: #e9ecef;
}

.comment-avatar {
    position: relative;
    z-index: 1;
}

.comment-content {
    padding-left: 8px;
}

.comment-text {
    font-size: 14px;
    line-height: 1.4;
}

.comment-author {
    font-size: 14px;
}

.comment-form-container {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 12px;
}

.comment-form-container .form-control {
    border-radius: 18px;
    border: 1px solid #ced4da;
    resize: vertical;
    min-height: 36px;
}

.comment-form-container .form-control:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}
}