/* ============================================================================
   ARTYS DESIGN SYSTEM - Component classes (product-agnostic)
   Generic, reusable component classes built from the design tokens.
   Class names are brand-generic (artys-*) so any Artys product can reuse them.
   Product-specific overrides (e.g. SRS .btn-srs / .sidebar-heading) live in
   the product's own CSS (home.css), not here.

   Phase 0: pills + sidebar label. Tables / legend / alerts / cards -> phase 1.
   Load order: AFTER tokens.css.
   ========================================================================== */

/* --- Pills (family/segment toggle buttons) ------------------------------ */
.artys-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-sans, "Raleway", sans-serif);
  font-weight: 600;
  font-size: 13px;
  line-height: 1.2;
  border: 1px solid transparent;
  border-radius: var(--radius-sm, 4px);
  padding: 8px 16px;
  cursor: pointer;
  background-color: var(--primary-500, #5B8DA6);
  border-color: var(--primary-500, #5B8DA6);
  color: #fff;
  transition: background-color var(--dur-fast, 140ms) var(--ease-standard, cubic-bezier(.4,0,.2,1));
}
.artys-pill:hover,
.artys-pill:focus {
  background-color: var(--primary-600, #497A93);
  border-color: var(--primary-600, #497A93);
  color: #fff;
}
.artys-pill:active {
  background-color: var(--primary-700, #1E5E77);
  border-color: var(--primary-700, #1E5E77);
}

.artys-pill--outline {
  background-color: transparent;
  border-color: var(--primary-500, #5B8DA6);
  color: var(--primary-500, #5B8DA6);
}
.artys-pill--outline:hover,
.artys-pill--outline:focus {
  background-color: var(--primary-500, #5B8DA6);
  border-color: var(--primary-500, #5B8DA6);
  color: #fff;
}

/* --- Sidebar section label (uppercase, letter-spaced, slate-grey) -------- */
.artys-sidebar__label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-sans, "Raleway", sans-serif);
  font-weight: 600;
  font-size: var(--fs-label, 0.75rem);
  line-height: 1.35;
  letter-spacing: var(--ls-label, 0.05em);
  text-transform: uppercase;
  /* grey-800 (8.6:1 on grey-50 canvas) for WCAG AA, not grey-700 */
  color: var(--grey-800, #495057);
}

/* --- Panel / card (white surface, hairline border, soft radius) --------- */
.artys-panel {
  background: var(--grey-0, #FFFFFF);
  border: 1px solid var(--border-1, #DEE2E6);
  border-radius: var(--radius-md, 6px);
  box-shadow: var(--shadow-xs, 0 1px 2px rgba(30, 94, 119, 0.06));
  overflow: hidden;
}
.artys-panel__head {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border-1, #DEE2E6);
  background: var(--surface-2, #F8F9FA);
  font-family: var(--font-sans, "Raleway", sans-serif);
  font-size: 13px;
  font-weight: 600;
  color: var(--grey-950, #212529);
}
.artys-panel__body {
  padding: 16px;
}

/* --- Auth screens (login / zone-select) ---------------------------------
   Full-screen glass card centred over a backdrop image. Product-agnostic.
   The page supplies its own backdrop in its <style>, e.g.
     .artys-auth::before { background-image: url('images/drops3.jpg'); }
   (a relative url() must be declared on the page, not here, or it would
   resolve relative to this stylesheet's folder).
   Field glass is applied to the Bootstrap .form-control / .form-select that
   live inside .artys-auth, so no extra class is needed on the inputs.
   Divergent bits stay in the page's own <style>: card max-width scale,
   ::placeholder / <option> specifics, and page-only panels (shake, user-info).
   ------------------------------------------------------------------------ */
.artys-auth {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  overflow-y: auto;
  z-index: 9999;
}
.artys-auth::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  z-index: -1;
}

.artys-auth__container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  position: relative;
  z-index: 10;
  max-height: 100vh;
  max-height: 100dvh;
  overflow-y: auto;
}

.artys-auth__wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.artys-auth__logo {
  text-align: center;
  margin-bottom: 2rem;
}
.artys-auth__logo img {
  width: min(280px, 70vw);
  height: auto;
  max-height: min(25vh, 250px);
  object-fit: contain;
}

.artys-auth__brand {
  color: #fff;
  font-size: 0.9rem;
  margin-top: 0.75rem;
  text-align: center;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}
.artys-auth__brand a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.3s ease;
}
.artys-auth__brand a:hover {
  opacity: 0.8;
}

.artys-auth__card {
  width: 380px;
  max-width: min(450px, 90vw);
  border-radius: 1rem;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
  min-height: min-content;
  transition: transform 0.2s;
}

.artys-auth__card-header {
  text-align: center;
  margin-bottom: 1.5rem;
}
.artys-auth__card-header h2 {
  color: #fff;
  font-weight: 600;
  font-size: 1.5rem;
  margin: 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.artys-auth .form-label {
  color: #fff;
  font-weight: 500;
  font-size: 0.875rem;
  margin-bottom: 0.4rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.artys-auth .form-control,
.artys-auth .form-select {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 0.5rem;
  padding: 0.625rem 0.875rem;
  font-size: 0.9rem;
  color: #333;
  transition: all 0.3s ease;
}
.artys-auth .form-control:focus,
.artys-auth .form-select:focus {
  background: rgba(255, 255, 255, 1);
  border-color: var(--brand-primary, #5b8da6);
  box-shadow: 0 0 0 0.25rem rgba(var(--primary-500-rgb, 91, 141, 166), 0.25);
  outline: none;
}

.artys-auth__btn {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.45);
  padding: 0.75rem 1.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  min-height: 44px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
.artys-auth__btn:hover {
  background: rgba(255, 255, 255, 0.28);
  border-color: rgba(255, 255, 255, 0.7);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}
.artys-auth__btn:focus {
  background: rgba(255, 255, 255, 0.25);
  outline: none;
  box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.2);
}
.artys-auth__btn:active {
  transform: translateY(0);
  background: rgba(255, 255, 255, 0.2);
}

/* Shared responsive scale. Card max-width diverges per page → stays in-page. */
@media (max-width: 1440px) {
  .artys-auth__container { gap: 3.5rem; }
  .artys-auth__logo img { width: min(320px, 70vw); }
  .artys-auth__card { padding: 1.75rem; }
  .artys-auth__card-header h2 { font-size: 1.35rem; }
  .artys-auth .form-label { font-size: 0.85rem; }
  .artys-auth .form-control,
  .artys-auth .form-select { padding: 0.6rem 0.8rem; font-size: 0.875rem; }
  .artys-auth__btn { padding: 0.7rem 1.5rem; font-size: 0.9rem; min-height: 42px; }
}
@media (max-width: 768px) {
  .artys-auth__container { padding: 1.25rem 0.875rem; gap: 5rem; }
  .artys-auth__logo img { max-height: 22vh; max-width: 260px; width: min(260px, 65vw); }
  .artys-auth__card { padding: 1.5rem; }
  .artys-auth__card-header h2 { font-size: 1.3rem; }
  .artys-auth .form-label { font-size: 0.875rem; }
  .artys-auth .form-control,
  .artys-auth .form-select { padding: 0.55rem 0.75rem; font-size: 0.875rem; }
  .artys-auth__btn { padding: 0.65rem 1.25rem; font-size: 0.875rem; min-height: 44px; }
}
@media (max-width: 480px) {
  .artys-auth__container { padding: 1rem 0.75rem; gap: 5rem; }
  .artys-auth__logo img { max-height: 18vh; max-width: 200px; width: min(200px, 55vw); }
  .artys-auth__card { padding: 1.25rem; }
  .artys-auth__card-header h2 { font-size: 1.2rem; }
  .artys-auth .form-label { font-size: 0.85rem; }
  .artys-auth .form-control,
  .artys-auth .form-select { padding: 0.5rem 0.7rem; font-size: 0.85rem; }
  .artys-auth__btn { padding: 0.6rem 1.25rem; font-size: 0.85rem; min-height: 42px; }
}
@media (max-height: 800px) {
  .artys-auth__container { padding: 1.25rem 0.875rem; gap: 2rem; }
  .artys-auth__logo img { max-height: 20vh; }
  .artys-auth__card { padding: 1.5rem; }
  .artys-auth__card-header h2 { font-size: 1.35rem; }
  .artys-auth .form-label { font-size: 0.875rem; }
  .artys-auth .form-control,
  .artys-auth .form-select { padding: 0.55rem 0.75rem; font-size: 0.875rem; }
  .artys-auth__btn { padding: 0.65rem 1.25rem; font-size: 0.875rem; min-height: 44px; }
}
@media (max-height: 600px) {
  .artys-auth__container { padding: 0.875rem 0.75rem; gap: 1.5rem; }
  .artys-auth__logo img { max-height: 14vh; }
  .artys-auth__card { padding: 1.25rem; }
  .artys-auth__card-header h2 { font-size: 1.2rem; }
  .artys-auth .form-label { font-size: 0.85rem; }
  .artys-auth .form-control,
  .artys-auth .form-select { padding: 0.5rem 0.7rem; font-size: 0.85rem; }
  .artys-auth__btn { padding: 0.55rem 1.25rem; font-size: 0.85rem; min-height: 40px; }
}
@media (max-height: 400px) {
  .artys-auth__logo { display: none; }
}
@media (min-height: 900px) {
  .artys-auth__logo img { max-height: min(40vh, 400px); }
}
