/* Global styles for ticmac-crm */
:root{
  --tc-primary: #802484;
  --tc-primary-shadow: rgba(128,36,132,0.50);
  --tc-input-bg: #FFF;
  --tc-radius: 20px;
}

/* Inputs (Bootstrap .form-control) */
.form-control, input[type="text"], input[type="email"], input[type="password"], textarea {
  border-radius: var(--tc-radius) !important;
  border: 1px solid var(--tc-primary) !important;
  background: var(--tc-input-bg) !important;
  box-shadow: 0 4px 4px 0 var(--tc-primary-shadow) !important;
  margin-bottom: 1rem !important;
}

/* Primary button */
.btn-primary {
  border-radius: var(--tc-radius) !important;
  border: 1px solid var(--tc-primary) !important;
  background: var(--tc-primary) !important;
  box-shadow: 0 4px 4px 0 var(--tc-primary-shadow) !important;
  color: #fff !important;
  padding: .4rem .9rem !important;
  min-width: 120px;
}

/* If you want a utility class to apply the same styles without overriding .form-control */
.ticmac-input {
  border-radius: var(--tc-radius);
  border: 1px solid var(--tc-primary);
  background: var(--tc-input-bg);
  box-shadow: 0 4px 4px 0 var(--tc-primary-shadow);
}

.ticmac-btn {
  border-radius: var(--tc-radius);
  border: 1px solid var(--tc-primary);
  background: var(--tc-primary);
  box-shadow: 0 4px 4px 0 var(--tc-primary-shadow);
  color: #fff;
}

/* Hover / focus / active transitions for buttons */
.btn-primary, .ticmac-btn, .ticmac-btn:link, .ticmac-btn:visited {
  transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease, background-color 120ms ease;
}
.btn-primary:hover, .ticmac-btn:hover, .btn-primary:focus, .ticmac-btn:focus {
  transform: translateY(-3px);
  filter: brightness(0.95);
  box-shadow: 0 8px 12px 0 rgba(128,36,132,0.28);
  background-color: darken(var(--tc-primary), 5%);
}
.btn-primary:active, .ticmac-btn:active {
  transform: translateY(-1px);
  box-shadow: 0 6px 8px 0 rgba(128,36,132,0.22);
}

/* Fallback when darken() is not available in plain CSS (some browsers): use a slightly different color as a safe fallback */
.btn-primary:hover, .ticmac-btn:hover { background-color: #6b1b72; }

/* SweetAlert2 confirm button should follow the same hover styles */
.swal2-popup .swal2-confirm:hover {
  transform: translateY(-3px);
  filter: brightness(0.95);
  box-shadow: 0 8px 12px 0 rgba(128,36,132,0.28);
}

/* SweetAlert2 customizations: make the close (X) purple and ensure confirm button matches ticmac style */
.swal2-popup .swal2-close {
  color: var(--tc-primary) !important;
  opacity: 1 !important;
}
.swal2-popup .btn.ticmac-btn, .swal2-popup .swal2-confirm {
  border-radius: var(--tc-radius) !important;
  background: var(--tc-primary) !important;
  border: 1px solid var(--tc-primary) !important;
  color: #fff !important;
  box-shadow: 0 4px 4px 0 var(--tc-primary-shadow) !important;
}

/* Global font */
body {
  font-family: 'Montserrat', sans-serif;
}

/* Top navbar (right aligned) */
.app-navbar {
  position: fixed;
  right: 0;
  top: 0;
  width: 100%;
  display: flex;
  justify-content: flex-end; /* keep navbar items to the right but inside the body */
  align-items: center;
  height: 6.5vh; /* responsive height */
  min-height: 48px;
  max-height: 72px;
  z-index: 99998; /* just below sidebar */
  pointer-events: auto;
  /* Make header visually distinct and static feeling: white background and subtle bottom border */
  background: #fff;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  overflow: visible; /* allow pseudo-element glow to show */
}

/* prominent purple line that slightly overhangs the navbar and has a blur/glow */
.app-navbar::before {
  content: '';
  position: absolute;
  top: -6px; /* overhang above the navbar */
  left: 0;
  right: 0;
  height: 6px;
  margin: 0 auto;
  width: 100%;
  background: var(--tc-primary);
  filter: blur(6px);
  transform: translateY(-2px);
  z-index: 99999; /* above navbar content */
  pointer-events: none;
}

/* a faint outer glow to emphasize the purple line */
.app-navbar::after {
  content: '';
  position: absolute;
  top: -12px;
  left: 1%;
  right: 1%;
  height: 18px;
  margin: 0 auto;
  background: var(--tc-primary);
  filter: blur(2px);
  z-index: 99998;
  pointer-events: none;
}

/* inner container to keep navbar content inside the main page width */
.app-navbar .navbar-inner {
  /* make inner container span almost the full width so items can go near the right edge */
  max-width: 1400px;
  display: flex;
  align-items: center; /* center items vertically within added padding */
  justify-content: flex-end;
  margin: 0 auto; /* centers the inner container when max-width applies */
  padding: 0.6rem 0.5rem 0.4rem 0.5rem; /* add top padding so icons sit lower from top edge */
}

/* Add top padding to the page content so fixed header doesn't cover it */
body { padding-top: 72px; }

/* Home hero: slightly higher and centered */
/* Home-specific styles moved to static/css/home.css */

@media (max-width: 767px) {
  .card-vertical, .card-horizontal { min-height: auto }
}

/* responsive profile bubble and notification sizing */
.profile-bubble {
  display: inline-block;
  width: clamp(40px, 4.5vh, 56px);
  height: clamp(40px, 4.5vh, 56px);
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--tc-primary);
  /* outlined: transparent background so bubble is not filled */
  background: transparent;
  flex: 0 0 auto;
  /* nudge further to the right (user requested near page end) */
  margin-left: 2.2rem;
}
.profile-bubble img { width:100%; height:100%; object-fit:cover }

/* notification button styles: keep inside layout and scale with viewport */
.nav-notification .btn {
  color: var(--tc-primary);
  /* make bell icon noticeably larger */
  font-size: clamp(20px, 1.6rem + 1.2vw, 30px);
  padding: 0.28rem 0.44rem;
  position: relative; /* so notif-dot positions relative to this button */
  /* outlined appearance */
  background: transparent;
  border: 1px solid var(--tc-primary);
  border-radius: 8px;
  /* push more to the right so items are almost at page edge */
  margin-left: 1.6rem;
  align-self: flex-start; /* place the bell at the top of the navbar-inner */
}

/* small red dot positioned relative to the notification button */
.notif-dot {
  position: absolute;
  right: 4px; /* move a little more inside the button */
  top: 4px;
  width: 10px;
  height: 10px;
  background: #ff4d4f;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(255,77,79,0.08);
}

/* ------------------------------------------------------------------
   Standardized purple scrollbar (site-wide)
   Applied to both WebKit and Firefox where supported. Uses the
   --tc-primary variable defined above for theme consistency.
   ------------------------------------------------------------------ */
*:focus { outline: none; }
html, body, .app-sidebar, .table-card-wrapper, .table-responsive, .swal-form-scroll {
  scrollbar-width: thin; /* Firefox */
  scrollbar-color: var(--tc-primary) rgba(0,0,0,0.04);
}

/* WebKit-based browsers */
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: rgba(0,0,0,0.03); border-radius: 10px; }
*::-webkit-scrollbar-thumb {
  background: var(--tc-primary);
  border-radius: 10px;
  border: 2px solid rgba(255,255,255,0.0);
}
*::-webkit-scrollbar-thumb:hover { background: #6b1b72; }


/* ensure any other navbar buttons follow the outlined style */
.app-navbar .btn {
  background: transparent !important;
  border: 1px solid transparent; /* leave transparent so specific buttons can override */
}

/* Global 'secondary-like' button: same shape as primary but gray */
.btn.secondary-like, .btn.btn-light.secondary-like {
  border-radius: 20px;
  border: 1px solid #848383;
  background: #848383;
  box-shadow: 0 4px 4px 0 rgba(128, 36, 132, 0.50);
  color: #fff;
  padding: .45rem .75rem;
}
.btn.secondary-like:hover { filter: brightness(0.98); }

/* Ensure the default bootstrap `.btn-secondary` matches the requested secondary style */
.btn.btn-secondary, .btn-secondary {
  border-radius: 20px !important;
  border: 1px solid #848383 !important;
  background: #848383 !important;
  color: #fff !important;
  box-shadow: 0 4px 4px 0 rgba(128, 36, 132, 0.50) !important;
}

/* Provide a utility class that visually matches primary but with neutral color */
.ticmac-btn--secondary {
  border-radius: var(--tc-radius);
  background: #e9eea0; /* slightly lighter fallback, overridden by .btn.secondary-like where used */
}

/* Employees-specific 'Limpiar' appearance (globalized so other modules can reuse it)
   This overrides the generic secondary-like to a compact dark-gray pill used in the employees filters */
.btn.secondary-like--employees, #employees-filters .btn.secondary-like {
  border-radius: 20px;
  border: 1px solid #848383;
  background: #848383;
  color: #fff;
  box-shadow: 0 4px 4px 0 rgba(128, 36, 132, 0.50);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .45rem .75rem;
  height: 38px;
  line-height: 1;
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn.secondary-like--employees svg, #employees-filters .btn.secondary-like svg { margin-right: .35rem; }
.btn.secondary-like--employees:hover, #employees-filters .btn.secondary-like:hover {
  box-shadow: 0 8px 20px rgba(128,36,132,0.12);
  transform: translateY(-2px);
}

/* Global scrollbar override (purple theme) - final, authoritative block
   This replaces earlier conflicting rules and ensures a consistent look
   across the entire site and apps. Uses --tc-primary for the theme color.
*/
*::-webkit-scrollbar { width: 12px; height: 12px; }
*::-webkit-scrollbar-track { background: rgba(0,0,0,0.03); border-radius: 12px; }
*::-webkit-scrollbar-thumb {
  background: var(--tc-primary);
  border-radius: 12px;
  border: 2px solid rgba(255,255,255,0.0);
  box-shadow: none;
}
*::-webkit-scrollbar-thumb:hover { background: #6b1b72; }

/* Firefox */
* { scrollbar-width: thin; scrollbar-color: var(--tc-primary) rgba(0,0,0,0.03); }


