/* public/assets/css/app.css - updated visual polish */

/* Root theme variables (single source of truth) */
:root {
  --ua-primary: rgb(97 57 219);
  --ua-gray: rgb(198, 198, 198);
  --ua-white: rgb(255, 255, 255);
  --ua-black: rgb(17 17 17);
  --ua-accent: rgb(32, 39, 108);
  --ua-radius: 12px;
  --ua-font: "Saira", Inter, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial;
  --ua-shadow: 0 8px 30px rgba(17, 17, 17, 0.06);
}

/* Base page */
body {
  font-family: var(--ua-font);
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  color: var(--ua-black);
  -webkit-font-smoothing: antialiased;
}

/* main container */
main.container-main {
  background: var(--ua-gray);
}

/* Topnav */
.ua-topnav {
  background: #fff;
  border-bottom: 1px solid rgba(17, 17, 17, 0.04);
  box-shadow: 0 6px 18px rgba(17, 17, 17, 0.02);
}

/* Buttons: ensure text remains white on hover for dark background */
.btn-ua-primary {
  background: var(--ua-primary);
  border: 0;
  color: #fff;
  border-radius: 10px;
  padding: 0.56rem 0.9rem;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
  box-shadow: 0 6px 18px rgba(97, 57, 219, 0.08);
}
.btn-ua-primary:hover,
.btn-ua-primary:focus {
  background: color-mix(in srgb, var(--ua-primary) 80%, black 10%);
  color: #fff !important;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(97, 57, 219, 0.12);
}

/* Ghost / outline variant */
.btn-outline-primary {
  border-radius: 8px;
}

/* Avatars: letter fallback */
.ua-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  background: var(--ua-primary);
  color: #fff;
}

/* Sidebar hover & shuttle effect */
.ua-sidebar .nav-link {
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.12s ease;
  color: var(--ua-white);
  font-weight: 500px;
}
.ua-sidebar-inner {
  background: var(--ua-primary);
}
.ua-sidebar .nav-link:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(17, 17, 17, 0.06);
  background: rgba(23, 119, 255, 0.04);
}
/* Sidebar: fixed and reserved space for main content */
#ua-sidebar {
  position: fixed;
  left: 0;
  top: 56px; /* accounts for navbar height */
  bottom: 0;
  width: 240px;
  min-width: 240px;
  overflow-y: auto;
  transition: transform 0.22s ease, width 0.18s ease;
  z-index: 1020;
  background: #fff;
  border-right: 1px solid rgba(17, 17, 17, 0.04);
}
/* Sidebar collapsed (icon-only) mode */
#ua-sidebar.collapsed {
  width: 72px !important;
  min-width: 72px;
}
#ua-sidebar.collapsed .nav-link {
  text-align: center;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}
#ua-sidebar.collapsed .nav-link .nav-text {
  display: none;
}
#ua-sidebar.collapsed .nav-link .ph {
  font-size: 1.25rem;
  display: block;
  margin: 0 auto;
}

/* Mobile open style */
#ua-sidebar.open {
  transform: translateX(0) !important;
}

/* Container main reacts to collapsed sidebar */
.container-main {
  margin-left: 240px;
  transition: margin-left 0.22s ease;
  padding-top: 32px;
}
.container-main.full {
  margin-left: 72px;
}

/* Table styles - modern */
.table.table-ua {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--ua-shadow);
  border: 0;
}
.table.table-ua thead th {
  background: #fff;
  font-weight: 600;
  color: #222;
  border-bottom: 0;
}
.table.table-ua tbody tr {
  transition: background 0.12s ease, transform 0.12s ease;
}
.table.table-ua tbody tr:hover {
  background: rgba(97, 57, 219, 0.03);
  transform: translateY(-3px);
}

/* Form label effect - subtle floating accent */
.form-floating-custom {
  position: relative;
}
.form-floating-custom label {
  position: absolute;
  left: 14px;
  top: 10px;
  pointer-events: none;
  transition: transform 0.18s ease, font-size 0.18s ease, top 0.18s ease,
    color 0.18s ease;
  font-size: 0.95rem;
  color: #6b7280;
  background: transparent;
  padding: 0 0.25rem;
}
.form-control:focus + label,
.form-control:not(:placeholder-shown) + label,
textarea.form-control:focus + label,
textarea.form-control:not(:placeholder-shown) + label {
  transform: translateY(-14px);
  font-size: 0.78rem;
  color: var(--ua-accent);
  top: 4px;
}

/* Inputs rounded */
.form-control {
  border-radius: 10px;
  padding: 0.6rem 0.8rem;
}

/* Card hover lift */
.card.hover-lift:hover {
  transform: translateY(-6px);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 12px 40px rgba(17, 17, 17, 0.08);
}

/* AI placeholder: left icon-only sidebar and workspace small tweaks */
.ai-left-mini {
  width: 64px;
}
.ai-left-mini .nav-link {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
}

/* Small helpers */
.text-muted-small {
  color: #6b7280;
  font-size: 0.85rem;
}

/* Responsive tweaks */
@media (max-width: 991px) {
  .container-main {
    margin-left: 0;
    padding-top: 72px;
  }
  #ua-sidebar {
    transform: translateX(-100%);
    width: 78%;
    min-width: 0;
    box-shadow: 0 8px 30px rgba(17, 17, 17, 0.08);
  }
  #ua-sidebar.open {
    transform: translateX(0);
  }
}
/* Small visual tweaks to make sure main content doesn't get pushed */
body {
  margin: 0;
  padding: 0;
}
main.container-main {
  display: block;
}

/* ---------- AI page extra styles (append to public/assets/css/app.css) ---------- */

/* Animated hide of sidebar when focusing */
body.focused-sidebar #ua-sidebar {
  transform: translateX(-120%) !important;
  opacity: 0;
  pointer-events: none;
}
body.focused-sidebar .container-main {
  margin-left: 28px !important;
}

/* Smooth transitions */
#ua-sidebar,
.container-main {
  transition: transform 0.38s cubic-bezier(0.2, 0.9, 0.2, 1),
    margin-left 0.38s cubic-bezier(0.2, 0.9, 0.2, 1), opacity 0.28s ease;
}

/* Make focus button visually toggle */
#ai-focus-btn[aria-pressed="true"] {
  background: #0b63d6;
  border-color: #0b63d6;
}

/* Embedded content text area look */
.content-text-area {
  background: var(--ua-gray);
  padding: 1rem;
  border-radius: 10px;
  max-height: 420px;
  overflow: auto;
}

/* Feature pane animation */
.ai-feature-pane {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.28s ease, opacity 0.28s ease, padding 0.18s ease;
}
.ai-feature-pane.show {
  display: block;
  opacity: 1;
  max-height: 800px;
  padding-top: 0.5rem;
}

/* Minor accessibility focus outlines */
a:focus,
button:focus,
input:focus {
  outline: 3px solid rgba(23, 119, 255, 0.12);
  outline-offset: 2px;
}
