/* Advoke CV — Editor Mobile Tab Switcher */

.editor-mobile-tabs {
  display: flex;
  width: 100%;
  background-color: var(--white);
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
  position: relative;
  z-index: 3;
}

@media (min-width: 1024px) {
  .editor-mobile-tabs {
    display: none;
  }
}

.editor-mobile-tabs__tab {
  flex: 1 1 0;
  min-width: 0;
  min-height: 44px;
  padding: var(--space-2) var(--space-1);
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-muted);
  background-color: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition:
    color var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out),
    background-color var(--duration-fast) var(--ease-out);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  -webkit-tap-highlight-color: transparent;
  position: relative;
}

.editor-mobile-tabs__tab:hover {
  color: var(--color-text);
  background-color: var(--color-accent-tint);
}

.editor-mobile-tabs__tab[aria-selected="true"] {
  color: var(--color-accent-active);
  border-bottom-color: var(--color-accent);
  background-color: var(--color-accent-tint);
}

.editor-mobile-tabs__tab svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.editor-mobile-tabs__label {
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
}

.editor-mobile-tabs__badge {
  position: absolute;
  top: 6px;
  right: calc(50% - 16px);
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  font-size: 9px;
  font-weight: var(--font-weight-bold);
  background-color: var(--color-accent);
  color: var(--color-accent-text);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.editor-mobile-tabs__panel {
  display: none;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.editor-mobile-tabs__panel.is-active {
  display: flex;
}

@media (min-width: 1024px) {
  .editor-mobile-tabs__panel {
    display: flex !important;
  }
}

.editor-mobile-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background-color: var(--white);
  border-top: 1px solid var(--color-border);
  flex-shrink: 0;
  padding-bottom: calc(var(--space-2) + env(safe-area-inset-bottom));
}

@media (min-width: 1024px) {
  .editor-mobile-nav {
    display: none;
  }
}

.editor-mobile-nav__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  min-height: 40px;
  padding: 0 var(--space-3);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
  background-color: var(--white);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-colors);
  flex: 1 1 auto;
}

.editor-mobile-nav__btn:hover:not(:disabled) {
  border-color: var(--color-accent);
  background-color: var(--color-accent-tint);
}

.editor-mobile-nav__btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.editor-mobile-nav__btn--primary {
  background-color: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-accent-text);
  flex: 1.3;
}

.editor-mobile-nav__btn--primary:hover {
  background-color: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
}

.editor-mobile-nav__btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.editor-mobile-sheet {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: none;
}

.editor-mobile-sheet.is-open {
  display: block;
}

.editor-mobile-sheet__backdrop {
  position: absolute;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  border: none;
  padding: 0;
  cursor: pointer;
}

.editor-mobile-sheet__panel {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 85dvh;
  background-color: var(--white);
  border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
  box-shadow: var(--shadow-2xl);
  display: flex;
  flex-direction: column;
  animation: editor-sheet-in var(--duration-base) var(--ease-out) both;
  overflow: hidden;
}

@keyframes editor-sheet-in {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

.editor-mobile-sheet__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border-subtle);
  flex-shrink: 0;
}

.editor-mobile-sheet__title {
  font-size: var(--text-base);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
  margin: 0;
}

.editor-mobile-sheet__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
}

.editor-mobile-sheet__close:hover {
  background-color: var(--color-accent-tint);
  color: var(--color-text);
}

.editor-mobile-sheet__close svg {
  width: 16px;
  height: 16px;
}

.editor-mobile-sheet__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--space-4);
}

@media (prefers-reduced-motion: reduce) {
  .editor-mobile-tabs__tab,
  .editor-mobile-nav__btn,
  .editor-mobile-sheet__panel {
    transition: none;
    animation: none;
  }
}