/* ==========================================================================
   Agenda Planner Studio — estilos complementares
   ========================================================================== */

/* --- Tipografia mais legível (menos “lavada”) --- */
.studio-app .label-text {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #334155; /* slate-700 */
}

.studio-app .studio-hint,
.studio-app .studio-panel-desc {
  font-size: 0.8125rem;
  line-height: 1.5;
  color: #475569; /* slate-600 */
}

.studio-app .studio-lead {
  color: #1e293b; /* slate-800 */
}

.studio-app .studio-panel-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: #0f172a; /* slate-900 */
  margin-bottom: 0.35rem;
}

.studio-app .studio-subsection-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 0.25rem;
}

/* --- Abas sequenciais (folder tabs + painel acoplado) --- */
.studio-tabbed {
  border-radius: 0 0 12px 12px;
  filter: drop-shadow(0 4px 14px rgba(15, 23, 42, 0.08));
}

.studio-tabs {
  display: flex;
  align-items: flex-end;
  gap: 0;
  margin: 0;
  padding: 0.5rem 0.5rem 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  background: linear-gradient(180deg, #94a3b8 0%, #cbd5e1 45%, #e2e8f0 100%);
  border: 2px solid #64748b;
  border-bottom: none;
  border-radius: 12px 12px 0 0;
  box-shadow: inset 0 2px 4px rgba(15, 23, 42, 0.15);
}

.studio-tab {
  position: relative;
  flex: 1 1 0;
  min-width: 8.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 0.9rem 0.75rem;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid #64748b;
  border-bottom: none;
  border-radius: 10px 10px 0 0;
  background-color: #e2e8f0;
  background-image: linear-gradient(180deg, #f8fafc 0%, #cbd5e1 100%);
  color: #475569;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    inset 0 -4px 8px rgba(15, 23, 42, 0.1),
    0 1px 0 rgba(255, 255, 255, 0.4);
  transition:
    background 0.15s,
    color 0.15s,
    box-shadow 0.15s,
    transform 0.12s,
    border-color 0.15s;
  transform: translateY(4px);
  z-index: 1;
}

.studio-tab + .studio-tab {
  margin-left: -1px;
  border-top-left-radius: 0;
}

.studio-tab:not(:last-child) {
  border-top-right-radius: 0;
}

.studio-tab:hover:not(.is-active) {
  background-color: #f1f5f9;
  background-image: linear-gradient(180deg, #fff 0%, #e2e8f0 100%);
  color: #334155;
  border-color: #475569;
  z-index: 2;
}

.studio-tab.is-active {
  transform: translateY(0);
  z-index: 5;
  margin-bottom: -1px;
  padding-bottom: calc(0.75rem + 1px);
  border-radius: 10px 10px 0 0;
  border-color: #64748b;
  border-bottom: 2px solid #fff;
  background-color: #fff;
  background-image: none;
  color: #312e81;
  font-weight: 700;
  box-shadow:
    0 -4px 12px rgba(15, 23, 42, 0.12),
    0 2px 0 #fff,
    inset 0 1px 0 rgba(255, 255, 255, 1);
}

.studio-tab.is-active + .studio-tab {
  border-top-left-radius: 10px;
}

.studio-tab.is-active::after {
  content: "";
  position: absolute;
  left: 0.65rem;
  right: 0.65rem;
  bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(90deg, #4f46e5, #6366f1);
}

.studio-tab-num {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #64748b;
  font-size: 0.6875rem;
  font-weight: 800;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.studio-tab.is-active .studio-tab-num {
  border-color: #4f46e5;
  background: #4f46e5;
  color: #fff;
  box-shadow: 0 1px 3px rgba(79, 70, 229, 0.45);
}

.studio-tab-label {
  flex: 1;
  text-align: left;
  line-height: 1.2;
}

.studio-panel-shell {
  position: relative;
  z-index: 4;
  background: #fff;
  border: 2px solid #64748b;
  border-top: 1px solid #94a3b8;
  border-radius: 0 0 12px 12px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 2px 8px rgba(15, 23, 42, 0.06);
  padding: 1.25rem;
}

@media (min-width: 640px) {
  .studio-panel-shell {
    padding: 1.5rem;
  }
}

.studio-tab-panel {
  animation: studio-fade-in 0.2s ease-out;
}

.studio-tab-panel.hidden {
  display: none;
}

@keyframes studio-fade-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.studio-nav-btn {
  padding: 0.55rem 1rem;
  border-radius: 0.65rem;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.studio-nav-btn:hover:not(:disabled) {
  border-color: #818cf8;
  background: #f8fafc;
}

.studio-nav-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.studio-nav-btn-primary {
  border-color: #4f46e5;
  background: #4f46e5;
  color: #fff;
}

.studio-nav-btn-primary:hover:not(:disabled) {
  background: #4338ca;
  border-color: #4338ca;
}

/* --- Sliders (range inputs) --- */
.range {
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 9999px;
  background: #e2e8f0;
  outline: none;
  cursor: pointer;
}
.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 9999px;
  background: #4f46e5;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  cursor: grab;
}
.range::-webkit-slider-thumb:active { cursor: grabbing; }
.range::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 9999px;
  background: #4f46e5;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  cursor: grab;
}

/* --- Color inputs --- */
.color-input::-webkit-color-swatch-wrapper { padding: 2px; }
.color-input::-webkit-color-swatch { border-radius: 6px; border: 1px solid #e2e8f0; }
.color-input::-moz-color-swatch { border-radius: 6px; border: 1px solid #e2e8f0; }

/* --- Dropzone --- */
#dropzone.drop-active,
#bg-dropzone.drop-active,
#producer-dropzone.drop-active {
  border-color: #6366f1;
  background: #eef2ff;
}

/* --- Preview: folha com sombra --- */
#preview-sheet {
  border-radius: 2px;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(15, 23, 42, 0.08);
}

/* --- Botões seletores ativos --- */
.studio-app .fmt-btn,
.studio-app .bind-btn,
.studio-app .lay-btn,
.studio-app .pal-btn,
.studio-app .style-btn,
.studio-app .wm-pos-btn,
.studio-app .bg-pos-btn,
.studio-app .producer-pos-btn {
  color: #334155;
}

button.ring-2 { box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.45); }
