/* Aurora Studio — advanced control layer */

button:disabled,
.aurora-btn-loading {
  opacity: .55;
  cursor: not-allowed;
  pointer-events: none;
}

.aurora-btn-loading {
  position: relative;
  color: transparent !important;
}
.aurora-btn-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255, 255, 255, .25);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: auroraSpin .65s linear infinite;
  color: #fff;
}
body.studio-app .aurora-btn-loading::after { color: #ff7a18; }
body.obsidian-app .aurora-btn-loading::after { color: #22d3ee; }
body.nova-app .aurora-btn-loading::after { color: #35e2c8; }

@keyframes auroraSpin { to { transform: rotate(360deg); } }

/* Tooltips — keyboard accessible */
.tt:focus-visible::after,
.tt:hover::after {
  content: attr(data-tt);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  background: #0a1424;
  color: #fff;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
  z-index: 60;
  pointer-events: none;
}

/* Confirm popover */
.aurora-confirm {
  position: absolute;
  z-index: 120;
  min-width: 14rem;
  padding: .85rem;
  border-radius: .85rem;
  background: rgba(15, 23, 42, .95);
  border: 1px solid rgba(148, 163, 184, .2);
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .85);
  backdrop-filter: blur(16px);
  animation: auroraPop .2s cubic-bezier(.22, 1, .36, 1);
}
body.studio-app .aurora-confirm {
  background: rgba(255, 255, 255, .96);
  border-color: rgba(30, 58, 103, .15);
  color: #101d36;
}
.aurora-confirm p { font-size: 12px; line-height: 1.45; margin-bottom: .65rem; }
.aurora-confirm-actions { display: flex; gap: .5rem; }
.aurora-confirm-actions button {
  flex: 1;
  border-radius: .55rem;
  padding: .45rem .65rem;
  font-size: 11px;
  font-weight: 700;
  transition: .18s;
}
.aurora-confirm-ok { background: #f43f5e; color: #fff; }
.aurora-confirm-ok:hover { filter: brightness(1.08); }
.aurora-confirm-cancel {
  background: transparent;
  border: 1px solid rgba(148, 163, 184, .25);
  color: inherit;
}

@keyframes auroraPop {
  from { opacity: 0; transform: translateY(6px) scale(.97); }
  to { opacity: 1; transform: none; }
}

/* Tab groups */
[role="tablist"] .tab-btn[aria-selected="true"],
[role="tablist"] .tab-btn.active {
  box-shadow: inset 0 0 0 1px rgba(53, 226, 200, .45);
}

/* Export menu keyboard focus */
[role="menuitem"]:focus-visible {
  outline: 2px solid rgba(53, 226, 200, .7);
  outline-offset: 2px;
}

/* Obsidian mobile export bar */
.obsidian-export-mobile {
  display: none;
  width: 100%;
  flex-wrap: wrap;
  gap: .35rem;
  margin-bottom: .35rem;
}
.obsidian-export-chip {
  border-radius: .55rem;
  border: 1px solid rgba(148, 163, 184, .2);
  background: rgba(148, 163, 184, .08);
  padding: .3rem .55rem;
  font-size: 10px;
  font-weight: 700;
  color: #94a3b8;
  transition: .18s;
}
.obsidian-export-chip.on {
  border-color: rgba(34, 211, 238, .6);
  background: rgba(34, 211, 238, .14);
  color: #a5f3fc;
}

@media (max-width: 640px) {
  body.obsidian-app .obsidian-export-mobile { display: flex; }
}

/* Toast stack */
#auroraToastHost {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: .45rem;
  pointer-events: none;
}
.aurora-toast {
  padding: .55rem 1rem;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(15, 23, 42, .92);
  color: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, .2);
  box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .8);
  animation: auroraToastIn .28s cubic-bezier(.22, 1, .36, 1);
}
body.studio-app .aurora-toast {
  background: rgba(16, 29, 54, .94);
  color: #fff;
}
@keyframes auroraToastIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
