/* Custom CSS for PleaseInterruptMe - Bootstrap customization to match shadcn/ui design */

/* Color Variables - matching globals.css HSL values */
:root {
  --primary: hsl(0, 0%, 9%);
  --primary-foreground: hsl(0, 0%, 98%);
  --background: hsl(0, 0%, 100%);
  --muted: hsl(0, 0%, 96.1%);
  --muted-foreground: hsl(0, 0%, 45.1%);
  --border: hsl(0, 0%, 89.8%);
  --card: hsl(0, 0%, 100%);
  --card-foreground: hsl(0, 0%, 3.9%);
  --radius: 0.5rem;
  
  /* Badge colors */
  --amber-50: #fffbeb;
  --amber-700: #b45309;
  --amber-200: #fde68a;
  --green-50: #f0fdf4;
  --green-700: #15803d;
  --green-200: #bbf7d0;
}

/* Base styling */
body {
  background-color: var(--muted);
  color: var(--card-foreground);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Card styling */
.card {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.card-header {
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.5rem;
  background-color: transparent;
}

.card-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--card-foreground);
}

.card-description {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-bottom: 0;
}

.card-body {
  padding: 1.5rem;
}

.card-footer {
  border-top: 1px solid var(--border);
  padding: 1rem 1.5rem;
  background-color: transparent;
}

/* Badge styling */
.badge {
  font-weight: 500;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
}

.badge-scheduled {
  background-color: var(--amber-50);
  color: var(--amber-700);
  border: 1px solid var(--amber-200);
}

.badge-completed {
  background-color: var(--green-50);
  color: var(--green-700);
  border: 1px solid var(--green-200);
}

.badge-warning {
  background-color: rgba(255, 193, 7, 0.1);
  color: #856404;
  border: 1px solid rgba(255, 193, 7, 0.3);
}

.badge-recommended {
  background-color: var(--primary);
  color: var(--primary-foreground);
  font-size: 0.625rem;
  padding: 0.125rem 0.5rem;
}

/* Button styling */
.btn-primary {
  background-color: var(--primary);
  border-color: var(--primary);
  color: var(--primary-foreground);
  font-weight: 500;
}

.btn-primary:hover {
  background-color: hsl(0, 0%, 12%);
  border-color: hsl(0, 0%, 12%);
  color: var(--primary-foreground);
}

.btn-outline-primary {
  border-color: var(--primary);
  color: var(--primary);
}

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

/* Sidebar styling */
.sidebar {
  background-color: var(--background);
  border-right: 1px solid var(--border);
  min-height: 100vh;
  z-index: 1000;
  max-width: 100%;
}

/* Desktop: use flexbox layout */
@media (min-width: 768px) {
  .sidebar {
    display: flex;
    flex-direction: column;
  }
  
  .sidebar > div:first-child {
    flex-shrink: 0;
  }
  
  .sidebar nav {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
  }
  
  .sidebar nav ul {
    flex-grow: 1;
  }
}

/* Style logout link in nav menu */
.sidebar .nav-item.border-top {
  border-top-color: var(--border) !important;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
}

/* Desktop: ensure sidebar can scroll if needed, showing logout button */
@media (min-width: 768px) {
  .sidebar {
    overflow-y: auto;
    overflow-x: hidden;
  }
  
  /* Ensure sidebar content doesn't overflow horizontally */
  .sidebar > div {
    max-width: 100%;
    overflow-x: hidden;
  }
}

/* Mobile sidebar overlay */
@media (max-width: 767.98px) {
  .sidebar {
    position: fixed !important;
    top: 56px !important; /* Below mobile header */
    left: 0;
    width: 16rem;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
    height: calc(100vh - 56px) !important;
    overflow-y: visible !important;
    overflow-x: hidden !important;
    max-height: calc(100vh - 56px) !important;
    display: block !important;
  }
  
  .sidebar.show {
    transform: translateX(0);
  }
  
  .sidebar:not(.show) {
    display: none !important;
  }
  
  /* Ensure sidebar content doesn't overflow horizontally on mobile */
  .sidebar > div {
    max-width: 100%;
    overflow-x: hidden;
  }
  
  /* Overlay when sidebar is open */
  .sidebar-overlay {
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
  }
  
  .sidebar-overlay.show {
    display: block;
  }
  
  /* Ensure mobile header doesn't create extra spacing */
  .navbar.d-md-none {
    position: sticky;
    top: 0;
    z-index: 1001;
  }
  
  /* Ensure main content is not covered by sidebar */
  .main-content {
    width: 100% !important;
    margin-left: 0 !important;
  }
}

/* Ensure no extra spacing on desktop */
@media (min-width: 768px) {
  .container-fluid .row {
    margin-left: 0;
    margin-right: 0;
  }
}

.sidebar .nav-link {
  color: var(--muted-foreground);
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

/* Adjust padding for smaller screens */
@media (max-width: 991.98px) {
  .sidebar .nav-link {
    padding: 0.5rem 0.5rem;
    gap: 0.5rem;
    font-size: 0.875rem;
  }
}

.sidebar .nav-link:hover {
  background-color: var(--muted);
  color: var(--card-foreground);
}

.sidebar .nav-link.active {
  background-color: var(--primary);
  color: var(--primary-foreground);
}

.sidebar .nav-link i {
  width: 1.25rem;
  text-align: center;
  flex-shrink: 0;
}

/* User name text styling - responsive like nav links */
.sidebar .user-name-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
}

/* Prevent hover effect on user name (it's not a link) */
.sidebar .nav-link.text-muted:hover {
  background-color: transparent;
  color: var(--muted-foreground);
}

/* Main content area */
.main-content {
  background-color: var(--muted);
  min-height: 100vh;
  padding: 2rem;
}

/* Adjust padding on desktop to prevent empty header space */
@media (min-width: 768px) {
  .main-content {
    padding-top: 1rem;
  }
  
  /* Ensure container-fluid doesn't add extra top spacing */
  .container-fluid {
    padding-top: 0;
  }
}

/* Stats cards */
.stats-card {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.stats-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.stats-card-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--card-foreground);
  margin: 0;
}

.stats-card-icon {
  color: var(--muted-foreground);
  width: 1rem;
  height: 1rem;
}

.stats-card-value {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--card-foreground);
  margin-bottom: 0.25rem;
}

.stats-card-description {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  margin: 0;
}

/* Call list items */
.call-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.call-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.call-item-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
}

.call-item-icon.clock {
  background-color: rgba(0, 0, 0, 0.05);
  color: var(--primary);
}

.call-item-icon.check {
  background-color: var(--green-50);
  color: var(--green-700);
}

.call-item-icon.warning {
  background-color: rgba(255, 193, 7, 0.1);
  color: #ffc107;
}

.call-item-icon.error {
  background-color: rgba(220, 53, 69, 0.1);
  color: #dc3545;
}

.call-item-content {
  flex: 1;
}

.call-item-title {
  font-weight: 500;
  margin-bottom: 0.25rem;
  color: var(--card-foreground);
}

.call-item-subtitle {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/* Form styling */
.form-label {
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--card-foreground);
}

.form-control, .form-select {
  border-color: var(--border);
  border-radius: var(--radius);
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

/* Radio group styling */
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.radio-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
}

.radio-item:hover {
  border-color: var(--primary);
  background-color: var(--muted);
}

.radio-item input[type="radio"]:checked + label {
  color: var(--primary);
}

.radio-item.selected {
  border-color: var(--primary);
  background-color: rgba(0, 0, 0, 0.02);
}

/* Tabs styling */
.nav-tabs {
  border-bottom: 1px solid var(--border);
}

.nav-tabs .nav-link {
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--muted-foreground);
  padding: 0.75rem 1rem;
}

.nav-tabs .nav-link:hover {
  border-bottom-color: var(--border);
  color: var(--card-foreground);
}

.nav-tabs .nav-link.active {
  border-bottom-color: var(--primary);
  color: var(--primary);
  background-color: transparent;
}

/* Switch/Toggle styling */
.form-check-input:checked {
  background-color: var(--primary);
  border-color: var(--primary);
}

/* Pagination */
.pagination .page-link {
  color: var(--primary);
  border-color: var(--border);
}

.pagination .page-link:hover {
  background-color: var(--muted);
  border-color: var(--primary);
}

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

/* Accordion styling */
.accordion-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
}

.accordion-button {
  background-color: var(--card);
  color: var(--card-foreground);
  border: none;
  font-weight: 500;
}

.accordion-button:not(.collapsed) {
  background-color: var(--muted);
  color: var(--primary);
  box-shadow: none;
}

.accordion-button:focus {
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
  border-color: transparent;
}

.accordion-body {
  background-color: var(--card);
  color: var(--muted-foreground);
}

/* Empty state */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  text-align: center;
}

.empty-state-icon {
  width: 2.5rem;
  height: 2.5rem;
  color: var(--muted-foreground);
  margin-bottom: 1rem;
}

.empty-state-title {
  font-size: 1.125rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--card-foreground);
}

.empty-state-description {
  color: var(--muted-foreground);
  margin-bottom: 1.5rem;
}

/* Utility classes */
.max-w-2xl {
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

.text-muted {
  color: var(--muted-foreground);
}

.text-primary {
  color: var(--primary);
}

.cursor-pointer {
  cursor: pointer;
}

/* Space utilities */
.space-y-8 > * + * {
  margin-top: 2rem;
}

.gap-2 {
  gap: 0.5rem;
}

.gap-3 {
  gap: 0.75rem;
}

.gap-4 {
  gap: 1rem;
}

/* Responsive adjustments */
@media (max-width: 767.98px) {
  .main-content {
    padding: 1rem;
    margin-left: 0 !important;
  }
  
  .stats-card {
    padding: 1rem;
  }
  
  .max-w-2xl {
    max-width: 100%;
  }
  
  /* Ensure main content is full width on mobile */
  .container-fluid .row > .main-content {
    width: 100%;
    margin-left: 0;
  }
}

/* Medium breakpoint adjustments for sidebar */
@media (min-width: 768px) and (max-width: 991.98px) {
  .sidebar {
    max-width: 100%;
  }
  
  .sidebar .nav-link {
    font-size: 0.875rem;
  }
  
  /* Ensure user profile section fits */
  .sidebar .avatar {
    width: 1.75rem !important;
    height: 1.75rem !important;
    font-size: 0.7rem !important;
  }
}

/* Avatar styling */
.avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--muted);
  color: var(--card-foreground);
  font-weight: 500;
  font-size: 0.875rem;
  flex-shrink: 0;
}

/* Pagination styling */
.pagination {
  margin-bottom: 0;
}

.pagination .page-link {
  color: var(--primary);
  border-color: var(--border);
  padding: 0.375rem 0.75rem;
}

.pagination .page-link:hover {
  background-color: var(--muted);
  border-color: var(--primary);
  color: var(--primary);
}

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

.pagination .page-item.disabled .page-link {
  color: var(--muted-foreground);
  background-color: var(--background);
  border-color: var(--border);
  cursor: not-allowed;
  opacity: 0.5;
}

/* Credit card icon container */
.credit-icon-container {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.05);
  color: var(--primary);
}

/* Plan selection cards */
.plan-card {
  position: relative;
  cursor: pointer;
  transition: all 0.2s;
}

.plan-card:hover {
  border-color: var(--primary);
}

.plan-card.selected {
  border-color: var(--primary);
  background-color: rgba(0, 0, 0, 0.02);
}

.plan-card.recommended::before {
  content: "Recommended";
  position: absolute;
  top: -0.5rem;
  right: 1rem;
  background-color: var(--primary);
  color: var(--primary-foreground);
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.625rem;
  font-weight: 500;
}

/* Ensure navbar Sign Up button is always visible */
@media (min-width: 992px) {
  .navbar-expand-lg .navbar-collapse {
    display: flex !important;
    flex-basis: auto;
    visibility: visible !important;
    height: auto !important;
  }
  
  .navbar-expand-lg .navbar-collapse.collapse {
    display: flex !important;
    visibility: visible !important;
    height: auto !important;
  }
  
  .navbar-expand-lg .navbar-collapse.collapse:not(.show) {
    display: flex !important;
    visibility: visible !important;
    height: auto !important;
  }
}

.navbar-nav .nav-link.btn {
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

