/* ===== Oficinar Web — barra de menús y diálogos ===== */

#owMenubar {
  flex: 0 0 auto;
  display: flex;
  align-items: stretch;
  gap: 2px;
  height: 30px;
  padding: 0 6px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.10);
  font-family: "Segoe UI", Calibri, Arial, sans-serif;
  font-size: 13px;
  user-select: none;
  position: relative;
  z-index: 4000;
}
.ow-menu-spacer {
  flex: 1 1 auto;
}
.ow-credits-ribbon {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px 0 16px;
}
.ow-credit-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.82);
  color: #1f2937;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  white-space: nowrap;
}
.ow-credit-pill strong {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.ow-credit-pill--silver {
  background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(241,245,249,0.95));
}
.ow-credit-pill--gold {
  background: linear-gradient(180deg, rgba(255,251,235,0.98), rgba(254,243,199,0.96));
}
.ow-credit-icon {
  font-size: 13px;
  line-height: 1;
}
.ow-credit-label {
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.ow-credits-ribbon.oculto {
  display: none;
}
.ow-menu-logo-ribbon { display: flex; align-items: center; padding: 0 16px 0 8px; border-right: 1px solid rgba(0,0,0,0.1); margin-right: 8px; }
.ow-menu-logo-ribbon img { height: 20px; width: 20px; object-fit: contain; border-radius: 4px; }
.ow-menu { position: relative; display: flex; }
.ow-menu-btn {
  border: none; background: transparent; padding: 0 11px; cursor: pointer;
  font: inherit; color: #333; border-radius: 6px; margin: 3px 0;
}
.ow-menu-btn:hover, .ow-menu.abierto .ow-menu-btn { background: rgba(0, 0, 0, 0.08); }
.ow-menu-desp {
  display: none; position: absolute; top: 100%; left: 0; min-width: 230px;
  background: rgba(255, 255, 255, 0.97); backdrop-filter: blur(14px);
  border: 1px solid rgba(0, 0, 0, 0.12); border-radius: 10px;
  box-shadow: 0 10px 34px rgba(20, 35, 70, 0.22);
  padding: 5px; z-index: 4001;
}
.ow-menu.abierto .ow-menu-desp { display: block; }
.ow-menu-item {
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  width: 100%; border: none; background: transparent; text-align: left;
  padding: 6px 10px; cursor: pointer; font: inherit; color: #222; border-radius: 6px;
}
.ow-menu-item:hover { background: #2b6cb8; color: #fff; }
.ow-menu-item kbd {
  font: 11px "Segoe UI", sans-serif; color: #888; background: none; border: none;
}
.ow-menu-item:hover kbd { color: #dce9fb; }
.ow-menu-sep { height: 1px; background: rgba(0, 0, 0, 0.10); margin: 4px 8px; }

/* ---- Diálogos ---- */
.ow-modal-fondo {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(25, 35, 60, 0.35); backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center;
}
.ow-modal {
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(0, 0, 0, 0.10); border-radius: 14px;
  box-shadow: 0 18px 60px rgba(15, 25, 60, 0.35);
  min-width: 340px; max-width: 480px; padding: 18px 20px 16px;
  font-family: "Segoe UI", Calibri, Arial, sans-serif; font-size: 13px; color: #222;
}
.ow-modal-titulo { font-size: 15px; font-weight: 600; margin-bottom: 10px; }
.ow-modal-msj { margin-bottom: 8px; line-height: 1.45; }
.ow-modal-detalle {
  white-space: pre-wrap; color: #555; font-size: 12px; margin-bottom: 8px;
  max-height: 160px; overflow: auto; background: rgba(0, 0, 0, 0.04);
  border-radius: 8px; padding: 8px 10px;
}
.ow-modal-botones { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.ow-btn {
  border: 1px solid rgba(0, 0, 0, 0.16); background: #fff; color: #222;
  border-radius: 8px; padding: 6px 16px; cursor: pointer; font: inherit;
}
.ow-btn:hover { background: #f0f4fb; }
.ow-btn.primario { background: #2b6cb8; border-color: #2b6cb8; color: #fff; }
.ow-btn.primario:hover { background: #245da3; }
.ow-input {
  display: block; width: 100%; box-sizing: border-box; margin: 8px 0;
  border: 1px solid rgba(0, 0, 0, 0.18); border-radius: 8px;
  padding: 7px 10px; font: inherit; background: #fff; color: #222;
}
.ow-input:focus { outline: 2px solid #2b6cb8; outline-offset: -1px; }
select.ow-input {
  -webkit-appearance: none; appearance: none; height: 34px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23556' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'><path d='M5 8l5 5 5-5'/></svg>");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 13px;
  padding-right: 32px;
}

/* La barra de menús no debe salir en impresión/PDF */
@media print {
  #owMenubar, .ow-modal-fondo { display: none !important; }
}

@media (max-width: 860px) {
  .ow-credit-label {
    display: none;
  }
  .ow-credits-ribbon {
    gap: 6px;
    padding-left: 6px;
  }
  .ow-credit-pill {
    padding: 0 8px;
  }
}

/* Estilos para botones grandes de la cinta (ej: pestaña Insertar) */
.btn.ow-ribbon-btn-large {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 6px 8px;
  cursor: pointer;
  min-width: 60px;
  height: 64px;
  transition: all 0.15s ease;
  color: #333;
}

.btn.ow-ribbon-btn-large:hover {
  background: #f0f0f0;
  border-color: #ddd;
}

.ow-ribbon-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1e3c72;
  margin-bottom: 4px;
}

.ow-ribbon-label {
  font-size: 11px;
  white-space: nowrap;
  font-family: system-ui, -apple-system, sans-serif;
  font-weight: 500;
}
.ow-btn-fullscreen {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; margin-right: 8px;
  border: 1px solid rgba(15, 23, 42, 0.08); border-radius: 999px;
  background: rgba(255, 255, 255, 0.82); color: #475569;
  cursor: pointer; box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  transition: background .12s, color .12s, transform .12s;
}
.ow-btn-fullscreen:hover { background: #fff; color: #2b6cb8; transform: scale(1.06); }
.ow-btn-fullscreen.activo { background: #2b6cb8; color: #fff; border-color: #2b6cb8; }
.ow-menu-logo-ribbon, .logo-principal { display: none !important; }
