/* Virtuoso Rehearse - Design System & Modern CSS Styles */

/* PETALUMA UNIVERSAL MUSIC & APP TYPOGRAPHY */
@font-face {
  font-family: 'PetalumaText';
  src: url('../assets/fonts/petaluma/PetalumaText.woff2') format('woff2'),
       url('../assets/fonts/petaluma/PetalumaText.woff') format('woff'),
       url('../assets/fonts/petaluma/PetalumaText.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'PetalumaText';
  src: url('../assets/fonts/petaluma/PetalumaText.woff2') format('woff2'),
       url('../assets/fonts/petaluma/PetalumaText.woff') format('woff'),
       url('../assets/fonts/petaluma/PetalumaText.otf') format('opentype');
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'PetalumaScript';
  src: url('../assets/fonts/petaluma/PetalumaScript.woff2') format('woff2'),
       url('../assets/fonts/petaluma/PetalumaScript.woff') format('woff'),
       url('../assets/fonts/petaluma/PetalumaScript.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Petaluma';
  src: url('../assets/fonts/petaluma/Petaluma.woff2') format('woff2'),
       url('../assets/fonts/petaluma/Petaluma.woff') format('woff'),
       url('../assets/fonts/petaluma/Petaluma.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Petaluma';
  src: url('../assets/fonts/petaluma/Petaluma.woff2') format('woff2'),
       url('../assets/fonts/petaluma/Petaluma.woff') format('woff'),
       url('../assets/fonts/petaluma/Petaluma.otf') format('opentype');
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg-dark: #0b0a09;
  --bg-card: rgba(20, 18, 16, 0.85);
  --bg-card-hover: rgba(32, 28, 25, 0.9);
  --bg-drawer: #12100e;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(167, 43, 32, 0.35);

  --accent-primary: #a72b20; /* Redwood red */
  --accent-glow: rgba(167, 43, 32, 0.4);
  --accent-secondary: #8c2219; /* Deep Redwood crimson */
  --accent-gold: #d97757; /* Terracotta timber accent */
  --accent-danger: #e63946;

  --text-main: #fafafa;
  --text-muted: #9e968f;
  --text-dim: #6e6660;

  --font-brand: 'Fraunces', Georgia, serif;
  --font-display: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-subtext: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-notation: 'Petaluma', 'PetalumaText', serif;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --shadow-main: 0 10px 30px -10px rgba(0, 0, 0, 0.7);
  --backdrop-blur: blur(20px);

  /* 3-Tier Surface Elevation & Spring Motion Tokens */
  --surface-canvas: #090807;
  --surface-panel: #13110f;
  --surface-raised: #1c1815;
  --surface-overlay: #26211d;
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

*::-webkit-scrollbar,
html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
  background: transparent;
}

/* GLOBAL BUTTON & INTERACTIVE ELEMENTS POINTER RESET */
button, 
select, 
input[type="button"], 
input[type="submit"], 
.btn-glass, 
.btn-primary, 
.btn-secondary, 
.btn-auth,
.tool-btn, 
.tool-btn-secondary,
.tab-pill, 
.theme-swatch-btn, 
.floating-feature-icon,
.floating-chat-trigger,
.btn-back-home,
.toolbar-retract-tab,
.swatch,
.bg-preset-btn {
  cursor: pointer !important;
  pointer-events: auto !important;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

button *,
.btn-glass *,
.btn-primary *,
.btn-secondary *,
.btn-secondary *,
.btn-auth *,
.tool-btn *,
.tool-btn-secondary *,
.tab-pill *,
.theme-swatch-btn *,
.floating-feature-icon *,
.floating-chat-trigger *,
.btn-back-home *,
.toolbar-retract-tab *,
.bg-preset-btn * {
  pointer-events: none !important;
}

.hidden {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

body.dark-theme {
  background-color: var(--bg-dark);
  background-image: 
    radial-gradient(ellipse at top center, rgba(26, 23, 21, 0.6) 0%, rgba(11, 10, 9, 0.95) 85%),
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.008) 0px,
      transparent 1px,
      transparent 4px
    );
  background-attachment: fixed;
  color: var(--text-main);
  font-family: var(--font-main);
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  border: 0 !important;
  border-bottom: 0 !important;
  outline: none !important;
}

/* APP HEADER REMOVED FOR CLEAN UNCLUTTERED WORKSPACE */
.app-header {
  display: none !important;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #fff;
  box-shadow: 0 0 16px var(--accent-glow);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.brand-titles {
  display: flex;
  flex-direction: column;
}

.app-title {
  font-size: 1.2rem;
  font-weight: 400;
  letter-spacing: 0.04em;
}

.accent-text {
  color: var(--accent-primary);
  font-weight: 600;
}

.app-subtitle {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

/* Active Score Title Info Header */
.active-score-info {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  padding: 6px 16px;
  border-radius: 30px;
  border: 1px solid rgba(167, 43, 32, 0.2);
  max-width: 45%;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.score-badge {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-gold);
  background: rgba(245, 158, 11, 0.15);
  padding: 3px 8px;
  border-radius: 12px;
  white-space: nowrap;
}

.score-title {
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-icon-label {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 4px 10px;
  border-radius: 14px;
  font-size: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-icon-label:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.session-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
}

.live-pulse {
  color: var(--accent-primary);
  animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

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

.btn-mini {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  margin-left: 4px;
  transition: color 0.2s;
}

.btn-mini:hover {
  color: #fff;
}

/* Role Pill */
.role-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
}

.user-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-name-label {
  font-size: 0.82rem;
  font-weight: 500;
}

.role-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 10px;
}

.host-badge { background: rgba(245, 158, 11, 0.2); color: var(--accent-gold); border: 1px solid rgba(245, 158, 11, 0.4); }
.leader-badge { background: rgba(59, 130, 246, 0.2); color: var(--accent-secondary); border: 1px solid rgba(59, 130, 246, 0.4); }
.editor-badge { background: rgba(16, 185, 129, 0.2); color: var(--accent-primary); border: 1px solid rgba(16, 185, 129, 0.4); }
.viewer-badge { background: rgba(156, 163, 175, 0.2); color: var(--text-muted); border: 1px solid rgba(156, 163, 175, 0.4); }

/* Drawer Toggles Buttons */
.drawer-toggles {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-toggle {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 7px 13px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: all 0.2s ease;
}

.btn-toggle:hover, .btn-toggle.active {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 16px var(--accent-glow);
}

.badge-count-parent {
  position: relative;
}

.badge-count {
  background: var(--accent-primary);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 10px;
}



/* TYPOGRAPHY SYSTEM: PROFESSIONAL MUSIC-CENTERED UI (OUTFIT) + ARTISTIC ENGRAVING (PETALUMA) */

/* Core UI Default: Clean, modern, highly legible with geometric musical curves */
html, body, button, input, select, textarea, .dialog-box, .modal-card, .settings-card, .dock-widget-tile, .tool-btn {
  font-family: var(--font-main);
}

/* ARTISTIC PETALUMA: DESKTOP PAGE, LOGO & BRAND TITLE, AND MAIN PAGE TITLES */
#home-view,
#home-view *,
.home-hero-view,
.home-hero-view *,
.vinyl-container,
.vinyl-container *,
.turntable-box,
.turntable-box *,
.turntable-title,
.vinyl-center-label,
.floating-feature-icon,
.floating-feature-icon *,
.icon-label,
.login-screen-overlay,
.login-screen-overlay h2,
.login-screen-overlay .login-subtitle,
.login-brand,
.login-brand *,
.hero-title,
.hero-subtitle,
.brand-section,
.brand-section *,
.brand-titles,
.brand-titles *,
.app-title,
.app-subtitle,
.brand-text,
.app-brand,
.app-brand *,
h1,
h2,
h3,
.page-title,
.page-title-group h2,
.section-subtitle,
.modal-header h3,
.rehearse-modal-header h3,
.settings-card h3,
.flyout-header h4,
#current-score-title,
#notes-score-title,
.score-title {
  font-family: var(--font-display) !important;
}

/* HIGH-READABILITY MICROCOPY & SUBTEXTS */
.settings-desc,
.setting-desc,
.setting-info small,
.settings-item p,
.score-composer,
.score-meta,
.score-date,
.event-meta,
.event-desc,
.event-date,
.chat-timestamp,
.chat-message-text,
.command-item-category,
.hint-text,
.status-tag,
.sync-indicator span,
.user-details span,
.account-status,
.subtext,
.card-desc,
.dialog-desc,
small {
  font-family: var(--font-subtext);
  letter-spacing: 0.012em;
}
